Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Insert max(id) + 1

$
0
0

Hi I am trying to insert data from table A to table B. Table A doesn't have id. How to insert MAx(id) +1 for each insert row?

Insert into table B

(max(id) + 1

,EIN,YEAR)

select distinct EIN, YEAR from Table A


simam


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>