问题不是出自INSERT,而是您要发出的无效SQL。首先尝试插入,然后尝试单独的count(*)查询,或者如果您使用的是PostgreSQL9.1+,则可以使用Common Tableexpressions和RETURNING
WITH ins AS ( insert into tableinfo ("table","date") values ('Sell','24 August') RETURNING "table")select count(*) from ins;
问题不是出自INSERT,而是您要发出的无效SQL。首先尝试插入,然后尝试单独的count(*)查询,或者如果您使用的是PostgreSQL9.1+,则可以使用Common Tableexpressions和RETURNING
WITH ins AS ( insert into tableinfo ("table","date") values ('Sell','24 August') RETURNING "table")select count(*) from ins;