By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

serial equivalent in DB2

P: n/a
If I want to create a table with a triggter to retrive data fast in DB2
database, how can I do that?
I know in informix we have serial as a data type. what is the equivalent in
DB2? what is the sql syntax of defining a column as the serial equivalent in
DB2?

Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DB2 has the sequence data type, which provides much of the functionality of
the IDS serial.

You can automatically populate the serial column (I think) by using the
serial_name.nextval as the default value for the column. Someone correct me
if I'm wrong about this.
M.P.
"Techie" <te**********@yahoo.com> wrote in message
news:gDF6d.4473$8H1.2345@trnddc08...
If I want to create a table with a triggter to retrive data fast in DB2
database, how can I do that?
I know in informix we have serial as a data type. what is the equivalent in DB2? what is the sql syntax of defining a column as the serial equivalent in DB2?

Thanks

Nov 12 '05 #2

P: n/a
Ian
Madison Pruet wrote:
DB2 has the sequence data type, which provides much of the functionality of
the IDS serial.

You can automatically populate the serial column (I think) by using the
serial_name.nextval as the default value for the column. Someone correct me
if I'm wrong about this.


IDENTITY is closer to serial (at least that's what we implemented in an
IDS -> DB2 migration).

A sequence isn't a data type, it's an object (that is independent of a
table).

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.