ORA-00957: duplicate column names

Source: Internet
Author: User

ORA-00957: duplicate column names

1. Error description

ORA-00957: duplicate column names

2. Error cause
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) 
When creating a database table, the stu_age field with the same name is defined, so an error is returned.

3. Solution

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)
Remove a stu_age Field

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.