Home All Groups Group Topic Archive Search About

insert into mytable (id) values () does not work

Author
11 Feb 2006 1:40 PM
Andreas Klemt
Hello,

I have this

create table myTable (id int identitiy(1,1))
insert into mytable (id) values ()  <<-------- Error

What is wrong?

Thanks for any help in advance!

Andreas Klemt

Author
11 Feb 2006 1:55 PM
Aaron Bertrand [SQL Server MVP]
Your syntax is wrong.  Not sure what the point of such a table, but try:

INSERT mytable DEFAULT VALUES



Show quote
"Andreas Klemt" <aklem***@hotmail.com> wrote in message
news:OYMBEDxLGHA.536@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I have this
>
> create table myTable (id int identitiy(1,1))
> insert into mytable (id) values ()  <<-------- Error
>
> What is wrong?
>
> Thanks for any help in advance!
>
> Andreas Klemt
>
Author
11 Feb 2006 2:06 PM
Andreas Klemt
Aaron, many thanks for your help!

Regards,
Andreas Klemt


Show quote
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> schrieb im
Newsbeitrag news:%23wcuUJxLGHA.916@TK2MSFTNGP10.phx.gbl...
> Your syntax is wrong.  Not sure what the point of such a table, but try:
>
> INSERT mytable DEFAULT VALUES
>
>
>
> "Andreas Klemt" <aklem***@hotmail.com> wrote in message
> news:OYMBEDxLGHA.536@TK2MSFTNGP09.phx.gbl...
>> Hello,
>>
>> I have this
>>
>> create table myTable (id int identitiy(1,1))
>> insert into mytable (id) values ()  <<-------- Error
>>
>> What is wrong?
>>
>> Thanks for any help in advance!
>>
>> Andreas Klemt
>>
>
>

AddThis Social Bookmark Button