Solved

CREATE TABLE syntax

Posted on 2016-09-28
4
56 Views
Last Modified: 2016-09-29
Hi EEE:

 Need to create table as below in oracle but getting error:

CREATE TABLE MYSCHEMA.MYTABLEFOR_LOOKUP(
col2_dept VARCHAR2(100) ,
col3_dept VARCHAR2(100),
col4_dept VARCHAR2(100),
col5_dept VARCHAR2(100),
col6 VARCHAR2 NOT NULL)


[CREATE - 0 row(s), 0.000 secs]  [Error Code: 928, SQL State: 42000]  ORA-00928: missing SELECT keyword
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec  [0 successful, 0 warnings, 1 errors]
0
Comment
Question by:LuckyLucks
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 41820149
You are missing a length for col6.

col6 VARCHAR2(100) NOT NULL


Are you only wanting col6 to be not null?
0
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41820182
CREATE TABLE MYSCHEMA.MYTABLEFOR_LOOKUP
(
	col2_dept VARCHAR2(100) ,
	col3_dept VARCHAR2(100),
	col4_dept VARCHAR2(100),
	col5_dept VARCHAR2(100),
	col6_dept VARCHAR2(100) NOT NULL
)

Open in new window

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41820187
Pawan,

I don't see anything in your post that is different from what I posted.
0
 

Author Closing Comment

by:LuckyLucks
ID: 41822245
thx
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question