no 컬럼은 auto_increment로 되어 있고요..
----------------------------------
no | name | tel
13 장금이 02-535-354
14 금영이 02-432-432
----------------------------------
테이블에 이미 위처럼 데이터가 들어가 있는 상태에서...
"insert into table (name,tel) values ('홍길동','02-43-432')"
한 다음에
"select last_insert_id(no) from table" 하면
값이 15 이 나와야 할것 같은데.. 자꾸 13 이 나와요...
실제로 select * from table 해서 보면
no | name | tel
13 장금이 02-535-354
14 금영이 02-432-432
15 홍길동 02-43-432
이렇게 insert 는 제대로 되어 있는데 말이죠..
뭘 잘못한거죠? |