467,151 Members | 933 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

serial equivalent in DB2

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
  • viewed: 2970
Share:
2 Replies
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
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.

Similar topics

4 posts views Thread by Per Magnus L?vold | last post: by
5 posts views Thread by Silke | last post: by
reply views Thread by Joe Thompson | last post: by
5 posts views Thread by EMW | last post: by
6 posts views Thread by John Wright | last post: by
2 posts views Thread by Sin Jeong-hun | last post: by
reply views Thread by Charles Crawford | last post: by
reply views Thread by =?Utf-8?B?Q2hhcmxpZQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.