02 October 2009
1 SQL Tutorial - Insert Zero in the auto incremental field
SQL Tutorial - MySQL Tips1 - Inserting Zero in the auto incremental field
How to insert a " 0" or zero value in the auto incremental column of MySQL ?
The following query will be setting Auto-increment to start from 0SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
This will allow us to insert value zero in the auto incremental column which otherwise can only begin with atleast 1. This change should in no way affect the existing auto-incremental values.
That is, Auto increment value will start from 1 itself but we will be able to insert a record with 0 in the auto increment column.
Subscribe to:
Post Comments (Atom)
1 comments:
How will I use PL/SQL?
Please give your valuable comments.