create table order( order_id string comment "订单唯一id", order_date string comment "下单日期", order_amount int comment "订单数量", product_ID int comment "产品ID", product_type string comment "产品品类", product_name string comment "产品名称", customer_ID string comment "客户ID", customer_name string comment "顾客名字", customer_sex int comment "顾客性别", order_type int comment "交易类型", region_ID int comment "销售区域ID", sale_region_big string comment "大区", sale_region_nation string comment "国家", sale_region_small string comment "城市", price int comment "单价", sales_amount int comment "销售金额" );哪里有错误
时间: 2023-07-19 19:19:55 浏览: 85
CreateTable.rar_create table ja_createTab_createTable
在这个 SQL 语句中,`order` 是一个关键字,不能用作表名。你需要修改表名,比如将其改为 `orders`。修改后的 SQL 语句应该是这样的:
```
create table orders(
order_id string comment "订单唯一id",
order_date string comment "下单日期",
order_amount int comment "订单数量",
product_ID int comment "产品ID",
product_type string comment "产品品类",
product_name string comment "产品名称",
customer_ID string comment "客户ID",
customer_name string comment "顾客名字",
customer_sex int comment "顾客性别",
order_type int comment "交易类型",
region_ID int comment "销售区域ID",
sale_region_big string comment "大区",
sale_region_nation string comment "国家",
sale_region_small string comment "城市",
price int comment "单价",
sales_amount int comment "销售金额"
);
```
阅读全文