The structure of table view buyers is as follows:
+----------------+-------------+------+-----+---------+-----
-----------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-----
-----------+
| user_pri_id | int(15) | | PRI | NULL | auto_increment |
| userid | varchar(10) | YES | | NULL | |
+----------------+-------------+------+-----+---------+-----
-----------+
the value of user_pri_id the last row 2345 then What will
happen in the following conditions?
Condition1: Delete all the rows and insert another row
then. What is the starting value for this auto incremented
field user_pri_id ,
Condition2: Delete the last row(having the field value
2345) and insert another row then. What is the value for
this auto incremented field user_pri_id
Answers were Sorted based on User's Feedback
Answer / amita
in first condition even though u deleted all the records
from the table it takes the next no. of last deleted record.
suppose there is 2000 records in the table then it will take
2001.
and in second condition the ans is 2346
Is This Answer Correct ? | 3 Yes | 0 No |
How to include character strings in sql statements?
Give the syntax of GRANT commands?
What is mysqladmin flush hosts?
How many columns can be used for creating Index?
How many columns is too many mysql?
How to Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.
How to get nth highest salary from table in a mysql?
What happens if null values are involved in expressions?
Explain the difference between BOOL, TINYINT and BIT?
Is mysql still popular?
How does triggers work in mysql?
How do I create a new database in mysql?