I have a table(CODE_LOOKUP) with 3 columns(CL_ID,CL_RC,CL_DESC)
i wanted to insert a new column taking the max(id)+1
This is the sql query i am trying to insert
INSERT INTO CODE_LOOKUP(CL_ID,CL_RC,CL_DESC)
values(max(CL_ID)+1, 'Region0', 'Region0');
I couldnot execute the Query..it throws me out saying
com.sybase.jdbc2.jdbc.SybSQLException: The name 'CL_ID' is illegal in this context. Only constants, constant expressions, or variables allowed here. Column names are illegal.
what is the correct way or Is there any other way i can insert the column into the database...