home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / esqlc / esql / samples.c / author2.sql next >
Encoding:
Text File  |  1995-11-21  |  853 b   |  35 lines

  1. use pubs
  2. go
  3.  
  4. drop table author2
  5. go
  6.  
  7. create table author2 (
  8.   au_id                          id,
  9.   au_lname                       varchar(40),
  10.   au_fname                       varchar(20),
  11.   phone                          char(12),
  12.   address                        varchar(40) NULL,
  13.   city                           varchar(20) NULL,
  14.   state                          char(2) NULL,
  15.   zip                            char(5) NULL,
  16.   contract                       bit,
  17.   timestamp                      timestamp)
  18. go
  19.  
  20. create unique clustered index auidind on author2 (
  21.   au_id   )
  22. go
  23.  
  24. create  index aunmind on author2 (
  25.   au_lname,
  26.   au_fname   )
  27. go
  28.  
  29.  
  30. insert author2 (au_id,au_lname,au_fname,phone,address,city,state,zip,contract)
  31.    select au_id,au_lname,au_fname,phone,address,city,state,zip,contract
  32.     from authors
  33.  
  34. go
  35.