LAST_INSERT_ID()
DELIMITER //;
CREATE FUNCTION adduser (username VARCHAR(30))
RETURNS int UNSIGNED
BEGIN
INSERT INTO test (username) VALUES (username);
RETURN LAST_INSERT_ID();
END
//
代码中 LAST_INSERT_ID()是mysql中自带函数么 还是别的什么?
DELIMITER //;
CREATE FUNCTION adduser (username VARCHAR(30))
RETURNS int UNSIGNED
BEGIN
INSERT INTO test (username) VALUES (username);
RETURN LAST_INSERT_ID();
END
//
代码中 LAST_INSERT_ID()是mysql中自带函数么 还是别的什么?
2016-08-10
举报