File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What does IDENTITY mean in SQL?

 
Namitha karupaiya
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CREATE TABLE DEMO_BLOB (
IDCOL INTEGER IDENTITY (1,1) PRIMARY KEY,
BLOBCOL BLOB)

In the above SQL command what does that IDENTITY (1,1) mean?

Thank you very much.
 
Martin Simons
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it seems to be a "new SQL Standard" way of saying AUTO_INCREMENT in
MySQL or creating a sequence in Oracle.

See the following:

http://www.oracle.com/technology/products/rdb/pdf/0307_identity_columns.pdf#search='SQL%20IDENTITY'
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It look to be an identity column which start from 1 and increment by 1
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic