Solved

CREATE TABLE syntax

Posted on 2016-09-28
4
62 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 77

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 77

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

749 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