home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / informix / 1625 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.2 KB

  1. Path: sparky!uunet!oracle!pyramid!infmx!news
  2. From: cortesi@informix.com (David Cortesi)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: RPT/DCL com file
  5. Message-ID: <1992Jul27.162915.7904@informix.com>
  6. Date: 27 Jul 92 16:29:15 GMT
  7. References: <9232@emory.mathcs.emory.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Reply-To: cortesi@informix.com
  10. Organization: Informix Software, Inc.
  11. Lines: 18
  12.  
  13. In article <9232@emory.mathcs.emory.edu> dave.snyder@snide.com (Dave Snyder)  
  14. writes:
  15. > Quoting FreeBird...
  16. > > 
  17. > >    when creating a table how do you specify the primary key?
  18. > > 
  19. > When creating a table with Informix products (except the low-level C-ISAM),
  20. > there is really no such thing as a primary key.  As a matter-of-fact, when
  21. > using Informix-SE which uses C-ISAM, if a table is created with one or
  22. > more indexes... ALL the indexes are treated as secondary keys.
  23.  
  24. Well, actually, if you are using an Informix SQL engine release 5.0,
  25. you specify the primary key in your CREATE TABLE statement:
  26.     CREATE TABLE customer (
  27.         customer_num SERIAL PRIMARY KEY ...
  28.  
  29. When the primary key is a composite key, you can specify 
  30. PRIMARY KEY (...list of columns...) after declaring the columns.
  31.