[thelist] SQL basic questions

rudy r937 at interlog.com
Tue Jan 22 05:47:56 CST 2002


> How would you do this in MS SQL?

DOH!

i'm sorry, ted, i mistakenly read your original question as mysql

joel had the create part --

> create table foo
>  (fookey numeric(9) IDENTITY PRIMARY KEY,
>   foodata varchar(20) null)

now the secret for sql/server is that you *don't* mention the identity key
when you insert a row --

   insert into foo (foodata)
      values ('bar')

easy, eh?

it's almost like inserting a null   ;o)


rudy





More information about the thelist mailing list