Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Name of a foreign key
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00954209
Message ID:
00954214
Vues:
14
Hi Sander,

You can use INFORMATION_SCHEMA, for example
SELECT * FROM  pubs.INFORMATION_SCHEMA.TABLE_CONSTRAINTS 
	WHERE table_name = 'titles' 
		AND constraint_type = 'FOREIGN KEY'
>
>I need to create a script to convert my database. To convert my database I need to drop a foreign key. To drop it, I use the command:
>
>ALTER TABLE my_table DROP CONSTRAINT my_foreign_key
>
>There is only one problem. I don't know the name of my foreign key, because the name of this key is generated by creation. How can I get the name of my foreign key? I have the parent and the child alias.
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform