MySQL Advance

USING SEQUENCES: HANDLING DUPLICATES, SQL INJECTION

views

14:37
Creating a Sequence means creating numbers in order (1,2,3……). This can be done by AUTO_INCREMENT attribute. AUTO_INCREMENT Attribute is used for creating unique number which will be acting as a Primary Key of the table. This attribute is set at the end of the column definition while creating a table. When AUTO_INCREMENT attribute is set for a column, you need not have to specify the value to that column. It gets automatically incremented by 1 and inserts that value to the column. If you remember our customer table CREATE Statement custid was set as AUTO_INCREMENT.