If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Create table sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-11, 07:22
faustian_1 faustian_1 is offline
Registered User
 
Join Date: Nov 2011
Posts: 3
Create table sql

Hi, I am very very new to databases and am attempting to run a basic SQL to create a table, using oracle 10g express edition.
I keep getting an error informing me i am missing a right parenthesis, however I have included it! Any help appreciated!

create table customers
(
CUST_ID number (4) NOT NULL,
FNAME varchar (15),
LNAME varchar (15),
ADDRESS varchar (5,10,5),
CITY varchar (15),
STATE char (2),
ZIP char (5)
);

error: ORA-00907: missing right parenthesis

Last edited by faustian_1; 11-17-11 at 07:43. Reason: MORE INFO
Reply With Quote
  #2 (permalink)  
Old 11-17-11, 08:21
flyboy flyboy is offline
Registered User
 
Join Date: Mar 2007
Posts: 546
Hi,

whenever you have problems with Oracle syntax, it would be the best thing to consult with the documentation. Oracle has very large set of documentation books; they are available e.g. online on http://tahiti.oracle.com/

CREATE TABLE statement is described in SQL Language Reference book. Just open the one for your Oracle version.

> varchar (5,10,5)
This data type is invalid; hard to tell whether any database supports it, but I would say that none. What data do you think will be stored there? Anyway it would be better to pick existing data type instead of inventing your own one.
Reply With Quote
Reply

Tags
10g, create, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On