我一直在尝试制作一个简单的表格,我不断提出SQL错误:ORA-00906:缺少左括号00906. 00000 - "缺少左括号"
CREATE TABLE USER_TABLE(
USER_ID int NOT NULL,
Username varchar NULL,
Password varchar NULL,
Email varchar NOT NULL,
DOB Date NULL,
Address VARCHAR NOT NULL,
First_name VARCHAR NOT NULL,
Telephone_number int NULL,
PRIMARY KEY (User_ID));
答案 0 :(得分:2)
您只需添加VARCHAR列的大小:
CREATE TABLE USER_TABLE
(
USER_ID INT NOT NULL,
Username VARCHAR(1) NULL,
Password VARCHAR(1) NULL,
Email VARCHAR(1) NOT NULL,
DOB DATE NULL,
Address VARCHAR(1) NOT NULL,
First_name VARCHAR(1) NOT NULL,
Telephone_number INT NULL,
PRIMARY KEY(User_ID)
);
请注意VARCHAR
为deprecated,最好使用VARCHAR2