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 >> can anyone make out this

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: can anyone make out this
 Muks  Posted: Feb 09, 2007 04:39:47 AM

 Total Post: 47
 Joined: Jan, 2007






 hey folks!!
I am trying to crate the table ...the script of which I am writing below but it is throwing an error of invalid option...can anyone make out y is it so,.....
SQL> create table title_copy
2 (copy_id number(10),
3 title_id number(10)
4 constraint title_copy_title_id_fk references title(title_id),
5 status varchar2(15)
6 constraint title_copy_status_nn not null
7 costraint title_copy_status_ck check (status in ('av','de','re','res')),
8 constraint title_copy_copy_id_title_id_pk
9 primary key(copy_id,title_id));
(copy_id number(10),
*
ERROR at line 2:
ORA-00922: missing or invalid option

..thanks a ton in advance
cheers!!
Mukta

 Jayanta
Posted: Feb 09, 2007 06:35:25 AM  

 Total Post: 479
 Joined: Feb, 2006






 
ur statement lack some comma

 dipali
Posted: Feb 09, 2007 12:34:18 PM  

 Total Post: 35
 Joined: Dec, 2006






 
Try to change it as shown following..

SQL> create table title_copy
2 (copy_id number(10),
3 title_id number(10)
4 constraint title_copy_title_id_fk references title(title_id),
5 status varchar2(15)
6 constraint title_copy_status_nn not null
7 costraint title_copy_status_ck check (status in ('av','de','re','res')),
8 constraint title_copy_copy_id_title_id_pk
9 primary key(copy_id,title_id));


 Manish
Posted: Feb 12, 2007 06:58:25 AM  

 Total Post: 5
 Joined: Jan, 2007






 
The query should go like this:

create table title_copy
(copy_id number(10),
title_id number(10)
constraint title_copy_title_id_fk references title(title_id),
status varchar2(15)
constraint title_copy_status_nn not null
constraint title_copy_status_ck check (status in ('av','de','re','res')),
constraint title_copy_copy_id_title_id_pk
primary key(copy_id,title_id));

 Muks
Posted: Feb 12, 2007 07:15:20 AM  

 Total Post: 47
 Joined: Jan, 2007






 
Hey thanks all...!!
Cheers
Mukta

 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 Kaushik387
  Vinoth Kumar379
  Gopu Gopi350
  Gitesh Trivedi322
  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