insert into 表名 set
代码语言:javascript复制CREATE TABLE `tbl_str` (
`id` INT DEFAULT NULL,
`Str` VARCHAR(30) DEFAULT NULL
)
##批量
INSERT INTO `mytest`.`tbl_str` (`id`, `Str`)
VALUE
('1', 'hello world'),
('2', 'mysql string'),
('3', 'hello');
##value和values都可以
##单条
INSERT INTO `mytest`.`tbl_str` (`id`, `Str`)
VALUE
('4', 'hello world2');
##可以单条添加
INSERT INTO `mytest`.`tbl_str` SET id = 10,str = 'nihao'
#多条不可以
#INSERT INTO `mytest`.`tbl_str`
#SET id = 11,str = 'dbadmin'
#SET id = 12,str = 'dbadmin2'