About 11,900,000 results
Open links in new tab
  1. List of foreign keys and the tables they reference in Oracle DB

    Mar 19, 2019 · I'm trying to find a query which will return me a list of the foreign keys for a table and the tables and columns they reference. I am half way there with SELECT a.table_name, …

  2. Como adicionar uma foreign key em uma tabela já criada

    Jan 30, 2016 · Sou iniciante em mysql e não consigo adicionar uma fk em uma tabela que criei. Tenho duas tabelas (pessoa, objeto) e desejo criar uma 'fk_pessoa' em objeto que receba o …

  3. How to create a foreign key in phpmyadmin - Stack Overflow

    Jun 3, 2016 · Thank you Alok! great answer I am new to using php so this is a great help - If I opt to create the foreign key using an sql statement - ` ALTER TABLE Patient ADD CONSTRAINT …

  4. What is a proper naming convention for MySQL FKs?

    Feb 10, 2010 · The reason for creating a symbolic name is for referencing when you want/need to drop the constraint. Oracle & SQL Server allow you to disable specific constraints. If you don't …

  5. Does a foreign key automatically create an index?

    An FK-relationship will often need to look up a relating table and extract certain rows based on a single value or a range of values. So it makes good sense to index any columns involved in an …

  6. sql - The ALTER TABLE statement conflicted with the FOREIGN KEY ...

    Why does add a foreign key to the tblDomare table result in this error? The ALTER TABLE statement conflicted with the FOREIGN KEY constraint …

  7. sql server - Cannot truncate table because it is being referenced …

    Oct 31, 2008 · Remove the FK, truncate the table, and recreate the FK. I thought that as long as I truncated the child table before the parent, I'd be okay without doing either of the options …

  8. How do I drop a foreign key in SQL Server? - Stack Overflow

    Sep 18, 2008 · Your syntax for dropping the FK doesn't need the words "foreign key". This is the syntax for MySQL, not SQL Server. You can replace it with the word "constraint".

  9. mysql - Add Foreign Key to existing table - Stack Overflow

    I want to add a Foreign Key to a table called "katalog". ALTER TABLE katalog ADD CONSTRAINT `fk_katalog_sprache` FOREIGN KEY (`Sprache`) REFERENCES `Sprache` …

  10. Differences between "foreign key" and "constraint foreign key"

    Sep 29, 2012 · I mean for example I can create table like create table XTable ( idt int not null primary key, value nvarchar(50), idq int, constraint fk_idq foreign key(idq) references …