select @@identity 사용
******************************************** ** select @@identity 사용 ******************************************** - Insert문 실행 후 새로 삽입된 자동증가값을 얻을 때 사용 SELECT @@IDENTITY PK가 int 타입일때문 가능하다 ex) int id(1,1); INSERT INTO t_Poll (Writer, Question, SDate, EDate, ItemCount, PollTotal, RegDate) VALUES ('Manager', '김태희,송혜교, 한채영 중 누가 클까?', '20090107', '20090109', 3, 0, GetDate()) SELECT @@IDENTITY
2009. 5. 4.