Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 I have a generl Insert statement and would like to get 1 or more default values

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-20 : 08:07:38
Bert writes "Hallo,
I have a general object which generates an SQL insert statement.
All the values I insert are know by me, but if the ROW definition contains default values, like NewID(), or current date, I would like to know what these column values are, just after inserting the values.
In general I would like to Select * the just Inserted Row, but I do not know the Key value, because this one is generated.
Could you help me"

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-09-20 : 08:10:50
Select Top 1 NewID, InsDate.......
From Mytable
Order by NewID


Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -