Mabuhay! Hi again! What would be the best sql query for this one;
I need to insert a new row in the table customer. If I'll use the insert into command with values it will arise an error on no null on ID. So I change my code to select max and +1 on ids but what I've got now is id+1 but I've noticed was the IDs still getting the same value like 1073905737 but different Account Number. Is there any cod ethat I forgot to write?
Code:
insert into [DBName].[dbo].[Customer]([ID],[AccountNumber]) values((Select max (id)from [Customer]) +1, '000700005951')
Thanks,
Chris
*This post is locked for comments