I'm pretty sure I didn't figure that one out. That's been in my notes since 6.5 days I think!!! And I can't count the number of times I've had to look it up because I needed this command.
Karen -----Original Message----- From: Albert Berry <[email protected]> To: rbase-l <[email protected]> Sent: Tue, Sep 27, 2016 10:31 am Subject: Re: [RBASE-L] - How to drop a foreign key in a table using SQL Karen, that's brilliant! I'm saving that one. Albert PS - email me - my address book when bye bye with Win 10 Anniversary when I had to reset my laptop to get it running again. A On 2016-09-27 8:33 AM, karentellef via RBASE-L wrote: This is tricky, I always have to look it up in my notes: SET VAR vTableID = sys_table_id from sys_tables where sys_table_name = ' ...... ' SET VAR vIndexName = sys_index_name from sys_indexes where sys_table_id = .vTableID and sys_column_name = ' .... ' ALTER TABLE <tablename> DROP CONSTRAINT &vIndexName Karen -----Original Message----- From: Tony IJntema <[email protected]> To: rbase-l <[email protected]> Sent: Tue, Sep 27, 2016 9:15 am Subject: [RBASE-L] - How to drop a foreign key in a table using SQL Hi, I like to remove a column from a table, which also happens to be a foreign key. So I have ro remove the Foreign key first and then drop the column. The proper commands are: alter table <table> drop constraint <conname> alter table <table> drop column <colum> My problem is that I don't know the <conname>. Does anybody knows how to find this conname? Tony -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

