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
What is orm in mysql?
What is myisamchk?
What is difference between unix timestamp and mysql timestamp?
How can we convert between Unix & MySQL timestamps?
How to rename an existing column in a table?
what is database black box testing? : Mysql dba
Does mysql use tcp or udp?
How do you rename a procedure in mysql?
What is inner join in mysql?
What is striped backup
What are the differences between char and varchar data types?
When to use order by in delete statement?
What are the similarities between a function and a procedure?
How do I find users in mysql?
Can we store files in mysql?