oracle建表错误 在线等

来源:百度知道 编辑:UC知道 时间:2024/06/05 19:41:26
SQL> create table employees
2 (
3 employeeId varchar2(6) not null,
4 name varchar2(10) not null,
5 birthdate date(8) not null,
6 sex number(1) not null,
7 address varchar2(20),
8 zip varchar2(6),
9 phonenumber varchar2(12),
10 emailaddress varchar2(30),
11 departmentId varchar2(3) not null,
12 constraint pk_employees primary key(employeeId)
13 );
birthdate date(8) not null,
*
第 5 行出现错误:
ORA-00907: 缺失右括号
不知道哪儿错了,高人指点!

SQL> CREATE TABLE T1(a date);

Table created.

SQL> CREATE TABLE T2(a date(8));
CREATE TABLE T2(a date(8))
*
ERROR at line 1:
ORA-00907: missing right parenthesis

把date(8)改为date

--
以上,希望对你有所帮助。