更新时间:2024-04-18 GMT+08:00
分享

SET

MySQL INSERT...SET语句的形式插入基于明确指定的值的行。

输入示例

1
2
3
4
# INSERT INTO  SET 可以针对性的执行插入操作,但是一次只能插入一行数据,不能批量添加数据
INSERT INTO  exmp_tb2 SET tb2_price=56.1,tb2_note='unbelievable',tb2_date='2018-11-13';
INSERT INTO  exmp_tb2 SET tb2_price=99.9,tb2_note='perfect',tb2_date='2018-10-13';
INSERT INTO  exmp_tb2 SET tb2_id=9,tb2_price=99.9,tb2_note='perfect',tb2_date='2018-10-13';

输出示例

1
2
3
4
-- INSERT INTO  SET 可以针对性的执行插入操作,但是一次只能插入一行数据,不能批量添加数据
INSERT INTO "public"."exmp_tb2" ("tb2_price","tb2_note","tb2_date") VALUES (56.1,'unbelievable','2018-11-13');
INSERT INTO "public"."exmp_tb2" ("tb2_price","tb2_note","tb2_date") VALUES (99.9,'perfect','2018-10-13');
INSERT INTO "public"."exmp_tb2" ("tb2_id","tb2_price","tb2_note","tb2_date") VALUES (9,99.9,'perfect','2018-10-13');
分享:

    相关文档

    相关产品