INSERT INTO jdbc.capm_shuidi.capm_filetype (id, filetype_name, created_by, created_time, updated_time)
SELECT
id,
filetype_name,
created_by,
TIMESTAMP '2021-02-26 11:53:56',
TIMESTAMP '2021-02-26 11:53:56'
FROM (VALUES ('8', 'xxx', 'shuidi')) AS T (id, filetype_name, created_by);
INSERT INTO jdbc.capm_shuidi.capm_filetype (id, filetype_name, created_by, created_time, updated_time)
VALUES ('8', 'xxx', 'shuidi', TIMESTAMP '2021-02-26 11:53:56', TIMESTAMP '2021-02-26 11:53:56'),
('9', 'xxxxxx', 'shuidi', TIMESTAMP '2021-02-26 11:53:56', TIMESTAMP '2021-02-26 11:53:56');
插入表的时候可以指定字段,如果没指定的字段是NOT NULL的SQL检验会报错,如果没指定的字段是可以为NULL,则会把这个可以为NULL的字段设置成NULL,相当于把没有指定的字段的指定上,并设置值为NULL。