Solved

CREATE TABLE syntax

Posted on 2016-09-28
4
59 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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

839 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