AutoIncrement insert into example in db2
Ensure the field created as auto increment in the db and simply leave that field while writing insertion query. It will be automatically incremented if we insert the values.
Insert into table_name (column_name1,column_name2,column_name3) values (value1,value2,value3);
Values should be within single quotes if it is string.
Insert into student_details (rno,name,department) values (56,’naveen kumar’,’cse’);
Thanks for reading this post…………….!!!
385 total views, 1 views today