IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we delete a foreign key by using ALTER statement


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raghs_sir

New User


Joined: 19 Jul 2005
Posts: 9
Location: Chennai

PostPosted: Tue Jul 26, 2005 4:09 pm
Reply with quote

hi,
can we delete a foreign key constraint by using alter statement?
i tried it out but its not working....
Back to top
View user's profile Send private message
arock08

New User


Joined: 15 Apr 2005
Posts: 4

PostPosted: Thu Jul 28, 2005 2:05 pm
Reply with quote

Yes, you can drop the foreign using the ALTER command. The syntax is below.

ALTER TABLE -table-name─ DROP FOREIGN KEY ─constraint-name─.

Please let me know what is the error you get?
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 2:12 pm
Reply with quote

hi frnd,
hope the drop foreign key will not work in alter table.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts DROP & ALTER PARTITION-PBR DB2 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
Search our Forums:

Back to Top