1、錯誤描述
ORA-00957: 重復的列名
SQL> create table info( 2 stu_id varchar2(7) not null, 3 stu_name varchar2(20) not null, 4 stu_age varchar(2) not null, 5 stu_age number(2) not null, 6 stu_seat number(2) not null, 7 enter_date date, 8 stu_add varchar2(100) default '', 9 class_no varchar2(4) not null 10 ); create table info( stu_id varchar(7) not null, stu_name varchar2(20) not null, stu_age varchar(2) not null, stu_age number(2) not null, stu_seat number(2) not null, enter_date date, stu_add varchar2(100) default '', class_no varchar2(4) not null )創建數據庫表時,定義了同名字段stu_age,所以報錯
3、解決辦法
create table info( stu_id varchar(7) not null, stu_name varchar2(20) not null, stu_age varchar(2) not null, stu_seat number(2) not null, enter_date date, stu_add varchar2(100) default '', class_no varchar2(4) not null )去掉一個stu_age字段