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



The structure of table view buyers is as follows: +----------------+-------------+------+-----+---..

Answer / guest

2346

Is This Answer Correct ?    4 Yes 0 No

The structure of table view buyers is as follows: +----------------+-------------+------+-----+---..

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

Post New Answer

More MySQL Interview Questions

Explain data type TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP .

2 Answers   Zensar,


What is root password?

0 Answers  


How do I view a mysql database?

0 Answers  


Why is the basic difference between left join, right join and inner join?

0 Answers  


what are the main differences between MyISAM and InnoDB table storage structures ? what are the advantages and disadvantages in usage of these ?

10 Answers   E2 Solutions, Tesco,






Table A has 5 rows and table B has 0 rows Cartesian join on A,B will have----rows

2 Answers  


Is Mysql query is case sensitive?

0 Answers  


How do I import database through command line?

0 Answers  


How can you validate emails using a single query?

0 Answers  


What is the difference Delete and Drop ?

6 Answers  


How do I rename a procedure?

0 Answers  


What are the 'mysql' command line arguments?

0 Answers  


Categories