• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 92
  • Last Modified:

CREATE TABLE syntax

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
LuckyLucks
Asked:
LuckyLucks
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
You are missing a length for col6.

col6 VARCHAR2(100) NOT NULL


Are you only wanting col6 to be not null?
0
 
Pawan KumarDatabase ExpertCommented:
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
 
slightwv (䄆 Netminder) Commented:
Pawan,

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

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now