I often used an auto increment primary key in creating my table due to unavailable candidate for a primary key. With the use of the use of the auto increment property, you will avoid duplicate entries for your primary key.
So here is the easy way on how to do it.
First, you add new table and you write the table name, column name, data type, length. For your primary key, you must set the data type into integer since you cannot increment other data types.
Then, under the index column, select PRIMARY from the drop down menu.
Third, you need to check the checkbox under the A_I column. A_I stands for auto increment.
Click the save button and that's it! You're done! Hope this helps!
Home /
Auto Increment /
MySQL /
AUTO INCREMENT IN SQL: How to Set Your Primary Key To Auto Increment
Friday, January 29, 2016
AUTO INCREMENT IN SQL: How to Set Your Primary Key To Auto Increment
Related Articles :
SQL JOIN: Display Records With or Without Match on The Other TableThere will be cases where you want to join two (2) table and display records that has match or even without match on the other table.T ...
SQL NOT IN: Display Records That Are NOT IN Another TableLet's say you want to display the records from the left table which is the ENROL table which are NOT IN the right table which is ...
SQL ORDER BY: Display Records in According to Date and Time in Descending OrderORDER BY is the keyword used to arrange records either in ascending (which is the default ordering if not set) or descending order.If ...
SQL NATURAL JOIN: Display Records That Have Match on the Other TableLet's say we have two (2) table, the STUDENT and GRADE table and we are going to display all students with grades only. We'll exclude ...
PHP MYSQL: Display Data in Tables From DatabaseSTUDENTFirst you construct your HTML code and insert the following code between your body code.HTML, PHP and MySQL Code<table ...
Subscribe to:
Post Comments (Atom)
Casino Slot Machines Near You - MapyRO
ReplyDeleteCasino Slot Machines Near Me - Find Casino Slot Machines Near 강원도 출장샵 You and Search for Casinos Near You 파주 출장안마 in the 군포 출장샵 This map shows the closest casinos to 동해 출장마사지 your city, in real time, 경주 출장안마