“column not allowed here” error in INSERT statement

前端 未结 8 2427
心在旅途
心在旅途 2020-12-05 17:39

I created this table called LOCATION by doing this:

CREATE TABLE LOCATION(
POSTCODE VARCHAR(10) PRIMARY KEY,
STREET_NAME VARCHAR(20),
CITY VARCHAR(20));
         


        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 18:18

    Some time, While executing insert query, we are facing:

    Column not allowed here

    error. Because of quote might missing in the string parameters. Add quote in the string params and try to execute.

    Try this:

    INSERT INTO LOCATION VALUES('PQ95VM','HAPPY_STREET','FRANCE');
    

    or

    INSERT INTO LOCATION (ID, FIRST_NAME, LAST_NAME) VALUES('PQ95VM','HAPPY_STREET','FRANCE');
    

    http://www.drtuts.com/oracle-error-column-not-allowed-here/

提交回复
热议问题