sql语句批量添加数据的方法是什么
sql语句批量添加数据的方法是什么?
方法1:逐条执行,速度慢。INSERT INTO testimport (name, message)VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd');INSERT INTO testimport (name, message)VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd');INSERT INTO testimport (name, message)VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd'); 方法2:批量执行,适用于 SQL Server。INSERT INTO testimport (name, message)VALUES('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd'),('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd'),('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd');方法3:批量执行,适用于Oracle。INSERT ALLINTO A (name, message) VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd')INTO A (name, message) VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd')INTO A (name, message) VALUES ('testname', 'jfksdfkdsfjksadljfkdsfjsdlafjdaslkfjasfd')SELECT 1FROM DUAL;推荐教程: 《sql教程》以上就是sql语句批量添加数据的方法是什么的详细内容,更多请关注小潘博客其它相关文章!