How do I create a single sql statement that will insert a row into a data table and return the row number back for processing? I tried to use the scope_identity method and find out it works well within a stored procedure environment.

If anybody out there have another method, I would appreciate the help.

after your insert query append
select @@IDENTITY statement

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.