jeudi 26 mars 2015

MS SQL INSERT INTO trouble

I need to insert new record in table. The first column name ob_no is int, not null. So I need generate number which is maximum ob_no at the moment +1. How can I do it? Something Like (max(ob_no) + 1) but it doesn't work in SQL 2005. Thanks for any ideas.



INSERT INTO et_thanks_2014 (ob_no, c_name)
VALUES (???, 'Some Text')

Aucun commentaire:

Enregistrer un commentaire