SQL错误:ORA-00906:缺少左括号00906. 00000 - "缺少左括号"

时间:2016-02-17 14:22:36

标签: oracle

我一直在尝试制作一个简单的表格,我不断提出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));

1 个答案:

答案 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)
);

请注意VARCHARdeprecated,最好使用VARCHAR2