473,473 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to find out the last generated key column in db2?

4 New Member
We have a tableA, in that table Primary_key column having auto increment
CREATE TABLE "tableA" (

"table_KEY" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 NO CYCLE CACHE 20))

could you please tell me the how to get last generated column?
i have searched for "db2 describe table SYSIBM.SYSSEQUENCES" but i did not get the proper information,
Pls Advise me...
Jan 3 '11 #1
0 1350

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jurgen Haan | last post by:
Hi Can I convert a plain integer column (non-key) in a table to a generated column using the ALTER TABLE .. ALTER COLUMN statement? If not, should I use the ALTOBJ statement? -R-
1
by: Hajime Kusakabe | last post by:
I made a datagrid and it contains several columns. The number of columns depend on what users select from a dropdown list. Therefore the number of columns changes. I would like to find the last...
5
by: Veeru71 | last post by:
Given a table with an identity column (GENERATED BY DEFAULT AS IDENTITY), is there any way to get the last generated value by DB2 for the identity column? I can't use identity_val_local() as...
3
by: Lance Hoffmeyer | last post by:
Hi all, I am trying to find the last used column in an excel sheet using win32com: lastcol = sh.UsedRange.Columns.Count works, but only if there is no formatting. I want to allow formatting...
1
by: Manuel Jaen | last post by:
Hi everybody, I'm starting up with those generated columns of the DB2, but all the examples that I come up are simple, and as far as I've read the thing I want to do is not possible. Can someone...
1
by: Jal | last post by:
I want a generated column which will have the current date as well as a running number concatenated yyyymmddxxxxxx where xxxxxx is a running sequence. Can I use a SQL query to generate the...
3
by: hellboss | last post by:
Hi Everyone ! im using SQL SERVER 2005, My problem is, i am inserting a set of values into a table using a subquery, the problem occurs when i tried to get the auto generated column in the table...
2
by: brazil.mg.marcus.vinicius.lima | last post by:
Hi, I'm constructing a query that will performs a lot o datetime calculumns to generate columns. All that operations are dependent of a base calculum that is performed on the query and its...
1
by: gkinu | last post by:
Application-Generated Column Values in DataGridView on New Record I have a DataGridView which I am using to enter new records to a table with 5 columns/fields. However, values for two of the...
1
by: Blaikie | last post by:
Hello, I have a basic database to record all customer orders for the Skip Hire company I work for. At the moment I use the 'Find and Replace' function to search through the database so when I need...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.