Creating Multiple table in Oracle

大城市里の小女人 提交于 2019-12-02 09:14:26

问题


I am using Oracle Express 10g and I'm enter the following text to create 2 tables in the sql command line, but it is not working.

CREATE TABLE student (
    matric_no     VARCHAR2(8),
    first_name    VARCHAR2(20),
    last_name     VARCHAR2(20),
    date_of_birth DATE
);

CREATE TABLE student1 (
    matric_no     VARCHAR2(8),
    first_name    VARCHAR2(20),
    last_name     VARCHAR2(20),
    date_of_birth DATE
);

Can anyone see what I am doing wrong.

Thanks


回答1:


By "command line" you probably mean the web application that comes with Oracle Express 10g. This application has several browser incompatibilities and is basically unable to execute several statements at once (also see Oracle 10g - invalid character on DB importing).

Either put your statements in a text file and upload them as a SQL script. Or switch to a better tool such as SQL Developer (downloadble from Oracle web site).




回答2:


Are you sure you didn't type this out in WORD?

Sometimes there are problems with "invisible" characters. For example if you hit TAB in WORD, it will store it as a special character which will thereby cause an error when you try running it in SQLPlus.



来源:https://stackoverflow.com/questions/8002394/creating-multiple-table-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!