sql,DELIMITER //,CREATE PROCEDURE InsertData(IN p_name VARCHAR(50), IN p_age INT),BEGIN, INSERT INTO my_table(name, age) VALUES (p_name, p_age);,END //,DELIMITER ;,
``sql,DELIMITER //,CREATE PROCEDURE InsertData(IN p_name VARCHAR(50), IN p_age INT),BEGIN, INSERT INTO my_table(name, age) VALUES (p_name, p_age);,END //,DELIMITER ;,
``INSERT INTO ... SELECT
语句将一个表中的数据插入到另一个表中。,,``sql,INSERT INTO target_table (column1, column2, ...),SELECT column1, column2, ...,FROM source_table;,
`,,这样就能将
source_table 中的数据插入到
target_table` 中。Powered By Z-BlogPHP 1.7.3