I want to insert a new row in a table say ‘table1’ with autogenerated value for a single non-primary column with a formula condition max+1 i.e maximum value among elements of that particular column. Tell me the correct formula
In short
How to compute max value in a column of int type and then how to insert new row with max=1 value to that column
I want to insert a new row in a table say ‘table1’ with autogenerated
Share
go to sql management studio ->rigth click on select table -> select design->then right click on your column->computed column specification->type desired formula here
OR
Fetch max value from the database for desired column and then add max+1 to that value and insert it to that specific column(new row containing that computed value)