The best way is to set the column to Identity in the table designer. To get the identity value of a row that was just inserted, return @@IDENTITY from the stored procedure.
>Hi everybody,
>
>Sorry for such naive question. If I want to insert data into the table, which has identity column, what can I do?
>
>Can I use statement similar to
insert into CreditInfo select * from CWebCreditLoad
, where CreditInfo would have one additional field (identity)?
>
>Thanks in advance.