ORA-00928: Missing SELECT keywords

Source: Internet
Author: User

Insert into reports an exception when inserting a record into the table, prompting: ORA-00928: missing SELECT keyword (missing SELECT keyword)

Cause:

1. For example, most of the online expressions are similar because the column names cannot be enclosed in single quotes:

For example, insert into usertab ('unipositioncode', 'transfergroupname', 'appcode', 'appname', 'transferport', 'cfg _ network', 'transferprotocol', 'transferip ', 'includestate') VALUES ('20170101', '1', '20', '123', '123', '0', '123', '0. 0.0.0 ', '0'), an error is returned;

2. Another reason may be that your Oracle database table name or column name is a reserved word in SQL. For example, the table name is written as PASSWORD, and the column name is written as USER.

The most common reserved oracle words are:
ACCESS ADD ALL ALTER AND ANY AS ASC AUDIT BETWEEN BY CHAR
CHECK CLUSTER COLUMN COMMENT COMPRESS CONNECT CREATE CURRENT
DATE DECIMAL DEFAULT DELETE DESC DISTINCT DROP ELSE EXCLUSIVE
EXISTS FILE FLOAT FOR FROM GRANT GROUP HAVING IDENTIFIED
IMMEDIATE IN INCREMENT INDEX INITIAL INSERT INTEGER INTERSECT
INTO IS LEVEL LIKE LOCK LONG MAXEXTENTS MINUS MLSLABEL MODE
MODIFY NOAUDIT NOCOMPRESS NOT NOWAIT NULL NUMBER OF OFFLINE ON
ONLINE OPTION OR ORDER PCTFREE PRIOR PRIVILEGES PUBLIC RAW
RENAME RESOURCE REVOKE ROW ROWID ROWNUM ROWS SELECT SESSION
SET SHARE SIZE SMALLINT START SUCCESSFUL SYNONYM SYSDATE TABLE
THEN TO TRIGGER UID UNION UNIQUE UPDATE USER VALIDATE VALUES
VARCHAR VARCHAR2 VIEW WHENEVER WHERE

Ps: If you use hibernate, you only need to modify the configuration file and add "[]" to the column name as follows:

<Id name = "uid" type = "java. lang. String">
<Column name = "[UID]"/>
<Generator class = "assigned"/>
</Id>

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.