[SQL]CREATE?TABLE?ORDER?(
SoleId?nvarchar?(50)?NOT?NULL?COMMENT?'訂單編號',
Userid?nvarchar?(50)?NOT?NULL?COMMENT?'客戶編號',
rid?nvarchar?(50)?NOT?NULL?COMMENT?'房間編號',
Soledte?Datetime?(8)?NOT?NULL?COMMENT?'訂單日期',
Number?INT?(4)?NOT?NULL?COMMENT?'數(shù)量',
State?nvarchar?(2)?NOT?NULL?COMMENT?'狀態(tài)',
Price?smallmoney?(4)?NOT?NULL?COMMIT?'價(jià)格'
)
[Err]?1064?-?You?have?an?error?in?your?SQL?syntax;?check?the?manual?that?corresponds?to?your?MySQL?server?version?for?the?right?syntax?to?use?near?'ORDER?(
SoleId?nvarchar?(50)?NOT?NULL?COMMENT?'訂單編號',
Userid?nvarcha'?at?line?1
3 回答
已采納

vicentia
TA貢獻(xiàn)24條經(jīng)驗(yàn) 獲得超28個(gè)贊
CREATE TABLE ORDER4 (
? ? SoleId nvarchar (50) NOT NULL COMMENT '訂單編號',
? ? Userid nvarchar (50) NOT NULL COMMENT '客戶編號',
? ? rid nvarchar (50) NOT NULL COMMENT '房間編號',
? ? Soledte Datetime NOT NULL COMMENT '訂單日期',
? ? Number INT (4) NOT NULL COMMENT '數(shù)量',
? ? State nvarchar (2) NOT NULL COMMENT '狀態(tài)',
? ? money ?double NOT NULL COMMENT '價(jià)格'?
)
mysql 沒有 沒有貨幣類型,可用double代替,table名與關(guān)鍵字重復(fù)

慕勒0069038
TA貢獻(xiàn)143條經(jīng)驗(yàn) 獲得超39個(gè)贊
order 是一個(gè)關(guān)鍵詞你把他改成 `order`(tab上面那個(gè)按鍵) 或者直接換成orderdetail
添加回答
舉報(bào)
0/150
提交
取消