How to Insert in a table with only an identity column

13 views
Skip to first unread message

sdeblois

unread,
Feb 23, 2011, 11:31:04 AM2/23/11
to dbfit
Hi,

I have some tables where the only content is one column and this
column is a SQL Server identity field.

MyTable (MyTableKey int identity)

I can't figure out how to write the "Insert" test and grab the
generated identity key.

In SQL code, you can insert in that type of table by doing: INSERT
INTO MyTable DEFAULT VALUES

Thanks,
Stef
Reply all
Reply to author
Forward
0 new messages