【发布时间】:2020-11-30 02:46:51
【问题描述】:
我尝试使用 postgresql 查询创建表:
CREATE TABLE customer_account(ID_account integer primary key, customer_name (lastname) text);
但它给出了错误消息:
ERROR: syntax error at or near "("
LINE 5: customer_name (lastname) text,
可能问题出在括号里,我已经试过了
CREATE TABLE customer_account("ID_account" primary key, "customer_name (lastname)" text);
但它也给了我类似的错误信息。
如何更正查询?我真的需要使用括号。
【问题讨论】:
-
@a_horse_with_no_name 我已经尝试使用 " 但它不起作用。或者我应该在不同的位置添加 " 吗?
标签: postgresql quoted-identifier