Solved

CREATE TABLE syntax

Posted on 2016-09-28
4
43 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
Comment Utility
You are missing a length for col6.

col6 VARCHAR2(100) NOT NULL


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

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
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)
Comment Utility
Pawan,

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

Author Closing Comment

by:LuckyLucks
Comment Utility
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.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now