AutoIncrement insert into example in db2

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…………….!!!

879 total views, 2 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.