Trying to find out if i can pass the SELECT SCOPE_IDENTITY FROM AND INSERT QUERY to a Variable, or if this can only be than with Store Procedures… I currently have all my code that require SCOPE_IDENTITY with SP, but i don’t know if there is way to do it without the SP.
Essentially i have insert into Table 1, then i want SCOPE_IDENTITY, to be user in another insert to another table on the same transaction.
Thanks