1. Trang chủ
  2. » Công Nghệ Thông Tin

Structured query language

78 600 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 78
Dung lượng 5,29 MB

Nội dung

! !"#"$%&'()*+,"&-+./(01##"2"( "#$%&'(#)'!*+!,-#.'&/.%-!,)0/)##&/)01!2)+*&(%'/*)!3#.4)*-*05!%)6!758#&)#'/.9! Faculty of Technology, Postboks 203, Kjølnes ring 56, N-3901 Porsgrunn, Norway. Tel: +47 35 57 50 00 Fax: +47 35 57 54 01 ! ! ! ! ! ! :'&;.';&#6!<;#&5!=%)0;%0#! >?@:AB,33,C!>?=DEC:,@1!FGHIJGKJGK! ! ! F! ! ! 3%8-#!*+!7*)'#)'9! H! 2)'&*6;.'/*)!'*!:<=!JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ!L! HJH! "%'%!"#+/)/'/*)!=%)0;%0#!M""=N!JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ!O! HJF! "%'%!P%)/$;-%'/*)!=%)0;%0#!M"P=N!JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ!O! F! 2)'&*6;.'/*)!'*!:<=!:#&Q#&!JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ!R! FJH! :<=!:#&Q#&!P%)%0#(#)'!:';6/*!JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ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6!M94*T)!/)!'4#!+/0;&#!%8*Q#NJ! _/'4!:<=!%)6!'4#!l<;#&5!,6/'*&m!T#!.%)!6*!%-(*9'!#Q#&5'4/)0!T/'4!.*6#1!8;'!9*(#'/(#9!/'!/9! %-9*!%!0**6!/6#%!'*!;9#!'4#!6/++#&#)'!"#9/0)#&!'**-9!/)!:<=!'*!4#-$!;9!6*!'4#!T*&g!T/'4*;'! .*6/)0!M9*!(;.4NJ! HG! ! 2)'&*6;.'/*)!'*!:<=!:#&Q#&! ! 3;'*&/%-^!:'&;.';&#6!<;#&5!=%)0;%0#!M:<=N! FJHJH 7&#%'#!%!)#T!"%'%8%9#! 2'!/9!];/'#!9/($-#!'*!.&#%'#!%!)#T!6%'%8%9#!/)!P/.&*9*+'!:<=!:#&Q#&J!a;9'!&/04'A /.g!*)!'4#! l"%'%8%9#9m!)*6#!%)6!9#-#.'!l@#T!"%'%8%9#hm! ! ! 34#&#!%&#!-*'9!*+!9#''/)09!5*;!(%5!9#'!&#0%&6/)0!5*;&!6%'%8%9#1!8;'!'4#!*)-5!/)+*&(%'/*)!5*;! (;9'!+/ !/)!/9!'4#!)%(#!*+!5*;&!6%'%8%9#^! ! [...]...  SQL language  to  create  a  new  database,  but  sometimes  it  is  easier  to   just  use  the  built-­‐in  features  in  the  Management  Studio   2.1.2 Queries   In  order  to  make  a  new  SQL query,  select  the  “New Query  button  from  the  Toolbar     Here  we  can  write  any  kind  of  queries  that  is  supported  by  the  SQL language   Tutorial: Structured Query Language. ..  and  Sybase       Tutorial: Structured Query Language  (SQL)   15     CREATE  TABLE     Below  we  see  the  same  tables  inside  the  design  tool  in  SQL  Server       Tutorial: Structured Query Language  (SQL)   16     CREATE  TABLE     3.2   Create   T ables   u sing   t he   D esigner   T ools   Even  if  you  can  do  “everything”  using  the  SQL language,  it  is  sometimes  easier...  and  select  “Relationships…”:     Tutorial: Structured Query Language  (SQL)   20     CREATE  TABLE       The  following  window  pops  up  (Foreign  Key  Relationships):     Click  on  the  “Add”  button  and  then  click  on  the  small  “…”  button  Then  the  following  window   pops  up  (Tables  and  Columns):   Tutorial: Structured Query Language  (SQL)   21     CREATE  TABLE     ... constraints  and  select  “Check  Constraints…”:   Tutorial: Structured Query Language  (SQL)   25     CREATE  TABLE       Then  click  “Add”  and  then  click  “…”  in  order  to  open  the  Expression  window:     In  the  Expression  window  you  can  type  in  the  expression  you  want  to  use:   Tutorial: Structured Query Language  (SQL)   26     CREATE  TABLE       3.3.6 DEFAULT  ... and OBJECTPROPERTY(id, N'IsUserTable') = 1 and name = 'CustomerNumber') ALTER TABLE CUSTOMER ALTER COLUMN CustomerNumber int Tutorial: Structured Query Language  (SQL)   29     Else ALTER TABLE CUSTOMER ADD CustomerNumber int GO   Tutorial: Structured Query Language  (SQL)   CREATE  TABLE       4 INSERT  INTO   The  INSERT  INTO  statement  is  used  to  insert  a  new  row  in  a  table ... FOREIGN   K EY   A  FOREIGN  KEY  in  one  table  points  to  a  PRIMARY  KEY  in  another  table   Example:     We  will  create  a  CREATE  TABLE  script  for  these  tables:   Tutorial: Structured Query Language  (SQL)   19     CREATE  TABLE     SCHOOL:   CREATE TABLE SCHOOL ( SchoolId int IDENTITY(1,1) PRIMARY KEY, SchoolName varchar(50) NOT NULL UNIQUE, Description varchar(1000) NULL, Address...  students)     Columns:  Use  Pascal  notation,  e.g.,  “StudentId”     Primary  Key:       o If  the  table  name  is  “COURSE”,  name  the  Primary  Key  column  “CourseId”,  etc   Tutorial: Structured Query Language  (SQL)   14     • • • • CREATE  TABLE     o   “Always”  use  Integer  and  Identity(1,1)  for  Primary  Keys  Use  UNIQUE   constraint  for  other  columns  that  needs  to  be  unique,... PRIMARY KEY, CustomerNumber int NOT NULL UNIQUE, LastName varchar(50) NOT NULL, FirstName varchar(50) NOT NULL, AreaCode int NULL, Address varchar(50) NULL, Phone varchar(50) NULL, ) GO Tutorial: Structured Query Language  (SQL)   22     CREATE  TABLE     We  see  that  “CustomerNumber”,  “LastName”  and  “FirstName”  is  set  to  “NOT  NULL”,  this   means  these  columns  needs  to  contain  data ... CREATE TABLE [CUSTOMER] ( CustomerId int IDENTITY(1,1) PRIMARY KEY, CustomerNumber int NOT NULL UNIQUE, LastName varchar(50) NOT NULL, FirstName varchar(50) NOT NULL, AreaCode int NULL, Tutorial: Structured Query Language  (SQL)   23     CREATE  TABLE     Address varchar(50) NULL, Phone varchar(50) NULL, ) GO We  see  that  the  “CustomerNumber”  is  set  to  UNIQUE,  meaning  each  customer  must  have...  right-­‐click  on  the  column  that  you  want  to  be  UNIQUE  and   select  “Indexes/Keys…”:       Then  click  “Add”  and  then  set  the  “Is  Unique”  property  to  “Yes”:   Tutorial: Structured Query Language  (SQL)   24     CREATE  TABLE       3.3.5 CHECK   The  CHECK  constraint  is  used  to  limit  the  value  range  that  can  be  placed  in  a  column   If  you  define  a  CHECK

Ngày đăng: 22/10/2014, 16:49

TỪ KHÓA LIÊN QUAN