473,398 Members | 2,403 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,398 software developers and data experts.

How to get generated key back in php/db2 v8.1.9 Linux

I am doing an insert into a table with a generated key. How do I obtain
the generated key of the record I just inserted?
Mar 22 '06 #1
3 1525
Try

select gen_key from final table(insert into your_table (columns) values
(values))

That is, select the generated key as part of the insert statement.

I really, really like that feature.

-Chris

Mar 22 '06 #2
Chris wrote:
Try

select gen_key from final table(insert into your_table (columns) values
(values))

That is, select the generated key as part of the insert statement.

I really, really like that feature.

-Chris

Thank you very much. No doubt it is implied by the fine manuals, but I
sure didn't find it in the *[Ii]dent* samples in the samples directory.
Mar 23 '06 #3
The manuals aren't perfect either. IMNSHO, you need to know what you
are looking for.

Although, one thing about is really nice. It lists possible error codes
when using bad parameters.

B.

Mar 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Irmen de Jong | last post by:
Hello, I don't understand why the following doesn't work. What I want to do is dynamically import some generated Python code and I'm doing this using compile and exec'ing it in the dict of a new...
3
by: Headless | last post by:
Should linking generated content work? Example: span:before{content:"foobar"} <a href="foobar.htm"><span></span></a> I stumbled across this bit in the CSS2 spec: >Generated content does...
14
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
1
by: Bhan | last post by:
C++ Libraries generated in windows Can be reused in Linux?(Lets assume that libs are not having any machine dependent features like os calls,etc) I felt that if we use same linker,we can do...
2
by: valerio | last post by:
Hi all, I've some problem to import data to DB2 using the db2move and db2look tools. Follow the problem : I have exported data from db2 v. 7 database on windows server, using the db2look and...
2
by: Brooks Clayton | last post by:
I have a split db created in A97. The backend currently resides on a Windows2000 machine and is accessed by front ends on other 2000 and Win98 machines all running A97, all on our local network. ...
5
by: Jim Hubbard | last post by:
There is another alternative which looks promising - REALbasic. I have just downloaded the demo - so don't lynch me if I'm wrong - but REALbasic looks like a very strong contender to take over...
10
by: shaanxxx | last post by:
I want to write a programme. I explain what it does. 1) It generates C code . // i know how to do it 2) It compiles that generated code. // i know how to do it. IMPORTANT ONE :...
3
by: Roy Chastain | last post by:
I have a schema that has been in existence over 1 year. I have been making a few minor modifications to it recently and suddenly the generated C# classes have made a radical change. I have just...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.