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
Answer Posted / 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 |
Post New Answer View All Answers
Are stored procedures precompiled?
How to return query output in xml format?
How many rows we can insert in a mysql table?
how we will Show selected records sorted in an ascending (asc) or descending (desc).
How to change the database engine in mysql?
What is normalization and list the different types of normalization?
How to get nth highest salary from table in a mysql?
Can you rename a database in mysql?
How can you import tables from a sql file into a database by using the mysql client?
using primary can we relate two table, with out foreign key?
Which statement is used to delete a table in MySQL.
What are all the Common SQL Function?
Is mysql case-sensitive?
How do I connect to mysql database?
Can you tell which of the following where clauses is faster?