Home » SQL & PL/SQL » SQL & PL/SQL » Alter table and Add Constraint
Alter table and Add Constraint [message #206666] Fri, 01 December 2006 00:55 Go to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
Hi Friends,

Its possible to add a constraint at the time of adding column..?

alter table gifterator_cart_finalimage ADD abc INTEGER NOT NULL CONSTRAINT ABC_FK FOREIGN KEY abc REFERENCES gifterator_product_details(grpd_id);

Its showing some error..

Kindly tell me the exact script..

Regards
Selva.R
Re: Alter table and Add Constraint [message #206668 is a reply to message #206666] Fri, 01 December 2006 00:58 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
selvakumar_82 wrote on Fri, 01 December 2006 07:55
Its showing some error..
Why don't you share the ORA message with us?

MHE
Re: Alter table and Add Constraint [message #206669 is a reply to message #206668] Fri, 01 December 2006 01:02 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
In My TOAD there is problem in showing error,

Even I am not able to find the exact message.

If you give me the exact syntax ,it will be useful...
Re: Alter table and Add Constraint [message #206671 is a reply to message #206669] Fri, 01 December 2006 01:04 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
What happens if you enter the same text in SQL*Plus? Does it show a specified error message then?

[Edit: and for the syntax, see the SQL reference: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm]

[Updated on: Fri, 01 December 2006 01:05]

Report message to a moderator

Re: Alter table and Add Constraint [message #206672 is a reply to message #206671] Fri, 01 December 2006 01:14 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
Hi,

Ok, I cant add constraint at the time of adding column....>


ORA-02253: constraint specification not allowed here

Regards
Selva.R
Re: Alter table and Add Constraint [message #206847 is a reply to message #206672] Fri, 01 December 2006 14:01 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

my be ENTERPRISE MANAGER CONSOLE can solve your problem.
Re: Alter table and Add Constraint [message #206850 is a reply to message #206847] Fri, 01 December 2006 14:35 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I thought that there's no console which can solve invalid syntax problems.
Re: Alter table and Add Constraint [message #206944 is a reply to message #206850] Sat, 02 December 2006 10:44 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

MAY BE U DON'T EVER PAY ATTENTION TO YOUR CONSOLE (LITTLE FOOT)

I DO THIS MANY TIME .PLEASE C CARE FULLY YOUR CONSOLE MANAGER .

REGARDS
Re: Alter table and Add Constraint [message #206949 is a reply to message #206944] Sat, 02 December 2006 11:25 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The original poster used invalid syntax. Littlefoot pointed out that invalid syntax stays invalid syntax, regardless of the tool you use!

(Your keyboard is stuck. Not only do all letters come out in capitals (maybe give the old capslock a good hit?), but there also appear to be some keys missing.)
Re: Alter table and Add Constraint [message #206959 is a reply to message #206949] Sat, 02 December 2006 12:48 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

[Mod-Edit:Removed non-English text. I warned you both in forum-post and in several PMs]

[Updated on: Sat, 02 December 2006 13:47] by Moderator

Report message to a moderator

Re: Alter table and Add Constraint [message #207067 is a reply to message #206959] Mon, 04 December 2006 01:19 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
i guesss this ones up for locking..maaher?
Re: Alter table and Add Constraint [message #207114 is a reply to message #207067] Mon, 04 December 2006 03:33 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Allow me.
Previous Topic: how to query and find out selected data in text file
Next Topic: how to dynamically access members of a record structure..
Goto Forum:
  


Current Time: Sat Dec 03 04:17:57 CST 2016

Total time taken to generate the page: 0.10443 seconds