Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Cannot create table

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Cannot create table
 vuong  Posted: Jan 13, 2007 06:10:31 PM

 Total Post: 7
 Joined: Jan, 2007






 I am trying to creat a table called 'ITEM' wit the following code:

-- Creation of Item Table
DROP TABLE ITEM CASCADE CONSTRAINTS;
CREATE TABLE ITEM(
ITEMID NUMBER (6) NOT NULL,



);

but i get this error message:
SQL> @table.sql
DROP TABLE ITEM CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


Input truncated to 2 characters
unknown command ")" - rest of line ignored.
Does any1 know y?

 Vigyan
Posted: Jan 13, 2007 06:30:15 PM  

 Total Post: 386
 Joined: May, 2001






 
Try.

CREATE TABLE ITEM( ITEMID NUMBER(6) NOT NULL );

 vuong
Posted: Jan 13, 2007 06:43:12 PM  

 Total Post: 7
 Joined: Jan, 2007






 
Thank you that works, but does that mean that when create a table, i can only do this on 1 line?

What if i want to add another attribute:
For example:
ITEMDESC VARCHAR (6) NOT NULL,

Must the above code b on the same line as the first?

 Vigyan
Posted: Jan 14, 2007 06:35:05 PM  

 Total Post: 386
 Joined: May, 2001






 
No. it is not necessary to have code in one line. This was a syntax problem.

Removing comma has solved the problem.

Thanks,
Vigyan


 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi333
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software