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
 General SQL Server Forums
 New to SQL Server Programming
 insert into a table with only one field (ID)

Author  Topic 

fabianus76
Posting Yak Master

191 Posts

Posted - 2007-11-25 : 15:26:30
Hello,
I would like to know the sql-query to insert a new row into a table which has only one column (ID) which is the primary key.

Thanks a lot for any suggestion !

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-25 : 16:13:51
insert tab_name valus(value)

But what's the table for?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-26 : 01:58:19
If it is identity column, then

insert into table_name default values


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2007-11-26 : 05:39:12
Thanks to you guys !
Madhivanan, your solution solved my problem !

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-26 : 07:49:06
quote:
Originally posted by fabianus76

Thanks to you guys !
Madhivanan, your solution solved my problem !

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !


Well. I guessed that you are using identity column

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -