This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / I can insert client data into db, but I can not query the recordId immidiately.I can insert client data into db, but I can not query the record Id immidiately. I need the primarykey id after the insert . but I can not get the correct resultSet. I can get the correct query in another query, but just after the insert sql command, the select query does not work.
-gemlan(gem);
2001-6-6
{282}
(#92472@0)
-
没有提交吧?
For Oracle just running the command:
SQL> Commit;
Query Again!
-jesse_song(feifan);
2001-6-8
(#94490@0)
-
If you are using SQL Server, the @@IDENTITYID is what you want
-miketany(kat);
2001-6-8
(#95015@0)