473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
2 3288
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Per Magnus L?vold | last post by:
Hi, I am working with a simple Java program which communicates over the serial port with a GSM modem. Using Hypertermial, I can send messages and need to press control-z to process the messages....
5
by: Silke | last post by:
Hi all! I'm trying to write a program in python using the modules 'serialwin32' and 'thread' to create one thread that writes to a serial port and another one that reads from it at 'the same...
0
by: Joe Thompson | last post by:
Is VC++.Net 2003 a bad choice for converting a program that mostly reads/writes data to a comport. Many of my messages are defined using bit-fields - I can't find an equivalent in managed C++. ...
1
by: James Wong | last post by:
Hi Everybody, I'm using VB.NET 2003 and have installed serial communication control from Sax. However, I found that there is no CTSHolding property which I use before in VB6's MSComm to...
5
by: EMW | last post by:
Hi, For my windows application I'm using OpenNetCF's serialport stuff but I'm having a small problem. In my program I want to list a range of available ports to select. This works fine for the...
6
by: John Wright | last post by:
I am trying to read the data from a device on a serial port. I connect just fine and can receive data fine in text mode but not in binary mode. In text mode the data from the device comes in...
2
by: Sin Jeong-hun | last post by:
Below is the code in Managed C++. It was originally written in C, and posted somewhere around the Internet (I forgot where I copied this code), and I changed it into Managed C++. This code returnes...
0
by: Charles Crawford | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.