Emailid
Password
         
  
    Forgot password

New user Sign Up
 

 

Error on the primary key with the constraint                             

Author Name Status Posted Time
Hilda Wasah 1/15/2008 11:24:55 PM
Author is Offline

Hi all,

This is a school related question. My lab says the following:

1. Add a new Vendor table
a. See table above for fields and data types
b. Use your username as the table definition, i.e., userid.Vendor, instead of Demo
c. Add Primary key ProductNo as a Constraint

Okay, I created the table with the fields and data types. Now when I go to add the primary key with the constraint and I get
ERROR at line 2:
ORA-00904: "VENDOR_NO": invalid identifier

When I enter:
Code: ( oracle8 )

  1. ALTER TABLE slp5065.vendor ADD
  2.  
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    CONSTRAINT ProductNo PRIMARY KEY (Vendor_No);


This is the command the teacher listed on the paper:
Code: ( oracle8 )
  1. ALTER tables:
  2.  
     
    Adding a single field AS a PRIMARY KEY
  3.  
     
     
     
    ALTER TABLE tablename ADD
  4.  
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    CONSTRAINT pk_name PRIMARY KEY (column_name);



What am I doing wrong?

 

Subject Author Status Date

Re: Error on the primary key with the constraint

Zebastti Tottileit 1/17/2008 1:34:07 AM

Re: Error on the primary key with the constraint

Hesus Oliver Pecce 1/17/2008 1:36:48 AM

Re: I see my dumb error on that one

Hilda Wasah 1/17/2008 1:43:31 AM

Re: First tell me in your query

Helen Deol 1/17/2008 1:53:12 AM

Re: Can anyone help?

Hilda Wasah 1/17/2008 1:45:20 AM

Re: Please let me know the following

Hesus Oliver Pecce 1/17/2008 1:46:51 AM

Re: Sorry very new to Oracle and all

Hilda Wasah 1/17/2008 1:48:11 AM

Re: Thank you for the reply

Hilda Wasah 1/17/2008 1:54:49 AM

Re: Do the following

Hesus Oliver Pecce 1/17/2008 1:55:36 AM

Re: slp5065.vendor table

Hilda Wasah 1/17/2008 1:56:51 AM

Re: Try this

Hesus Oliver Pecce 1/17/2008 1:57:59 AM

Re: Error on the primary key with the constraint

Hesus Oliver Pecce 1/17/2008 1:42:44 AM
Related Forums
Optimizing Images
Get a Website Template for Free!!!
Get a Website Template for Free!!!
Reply to Hesus!!!
Do You Sell Your Templates on Ebay?





Home | About Us | Site Map | Privacy Policy