Home » SQL & PL/SQL » SQL & PL/SQL » Can we rename a constraint
Can we rename a constraint [message #320507] Thu, 15 May 2008 05:41 Go to next message
manoj12
Messages: 185
Registered: March 2008
Location: India
Senior Member
Dear Sir

When we create a table with columns having constraints for eg

create table xyz(x number(10) not null,y number);

when we use this command the table is created with x column having not null constraints and the constraint name appears to be default name like this SYS_CO053288.Can we rename the name of the constraint from SYS-O053288 TO NN_XYZ_ABC after creating the table?.If we can rename the name of the constraints how we can do?.
Regards

[Updated on: Thu, 15 May 2008 05:42]

Report message to a moderator

Re: Can we rename a constraint [message #320508 is a reply to message #320507] Thu, 15 May 2008 05:44 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

ALTER TABLE xyz RENAME CONSTRAINT SYS_O053288 TO NN_XYZ_ABC
Re: Can we rename a constraint [message #320509 is a reply to message #320507] Thu, 15 May 2008 05:44 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
alter table ... rename constraint ... to ...

Regards
Michel
Re: Can we rename a constraint [message #320512 is a reply to message #320507] Thu, 15 May 2008 05:46 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Search is a good facility and it could be used before posting on the forums.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2133183

Regards

Raj

P.S : @Michael, I am too slow in typing Cool

[Updated on: Thu, 15 May 2008 05:47]

Report message to a moderator

Re: Can we rename a constraint [message #320513 is a reply to message #320509] Thu, 15 May 2008 05:46 Go to previous message
manoj12
Messages: 185
Registered: March 2008
Location: India
Senior Member
Dear Sir

Thank you very much.

Regards
Previous Topic: Tunning of SQL,it fetches more than one lakh rows
Next Topic: limit in forall colect
Goto Forum:
  


Current Time: Mon Dec 05 15:06:41 CST 2016

Total time taken to generate the page: 0.09728 seconds