Linked Questions

2 votes
2 answers
4k views

I am using C# with MS Access 2010. I need to retrieve the table relationships from the DB in order to determine the relationships between entities and use them in my C# code. I need the same ...
OnlyMahesh's user avatar
2 votes
6 answers
486 views

I have about 50 tables with created-by and changed-by referencing the user table. When I want to delete the user, I would like to create a list of what tables this user has data in, so one can go ...
devzero's user avatar
  • 2,700
0 votes
2 answers
4k views

Suppose, I know the name of a Table TableName1 in the Database Database1. I want to find: the foreign keys that table has. what foreign tables they are referencing. what foreign columns they are ...
user366312's user avatar
  • 17.5k
3 votes
2 answers
745 views

Two days ago, I have asked this question on how to modify deletion rules of foreign key constraints at runtime. That question has been answered, but now I would like to generalise my program: ...
Dominique's user avatar
  • 17.6k
2 votes
3 answers
951 views

I have a project that run some integration tests. The project creates a new database each time and run the tests against this new db. Recently I moved this project to a new server and I'm having some ...
estebane97's user avatar
  • 1,148
2 votes
1 answer
2k views

Is there a way to get all relations between all db tables by using INFORMATION_SCHEMA? I tried to use INFORMATION_SCHEMA.KEY_COLUMN_USAGE to get it, because it works with MySQL, but it doesn't have ...
KindFrog's user avatar
  • 388
3 votes
3 answers
556 views

There is a copy of a huge MS Sql Server 2005 database, with more than 1300 tables, plus hundreds of stored procedures and dozens of views, not counting jobs. It is used by several applications. I ...
Jacek's user avatar
  • 194
0 votes
1 answer
879 views

I have a legacy Microsoft SQL Server database with many tables. I have a foreign key in table Order called CategoryID. I cannot find the table column the foreign key CategoryID is pointing to. I do ...
alex's user avatar
  • 25
0 votes
3 answers
882 views

I have need to automate the process of database upgrade process. So by getting the column structure of a table i need to create update/insert/create sql statement's . BY problem was i am getting ...
user3306533's user avatar
1 vote
2 answers
237 views

I have a table that I would like to find all the other tables that foreign key it. I thought this thread had the answer: How can I list all foreign keys referencing a given table in SQL Server? But ...
user avatar
1 vote
2 answers
848 views

I have a Microsoft SQL Server 2012 database with a huge amount of tables (>100). I have also many many-to-many relation tables. All PK/FK relationships are made in the tables so that i know in which ...
STORM's user avatar
  • 4,326
0 votes
1 answer
788 views

I've got a method that deletes all data in a table however this wont work if there is a foreign key constraint. How do I check if there any reference constraints exist, delete those entriesfirst and ...
user avatar
1 vote
1 answer
513 views

I am using the following query to list the table constraint(Primary Keys, Unique Keys, Default keys), however, I am having hard time in getting a list of foreign keys and its references (columns). ...
hans1125's user avatar
  • 437
0 votes
2 answers
347 views

I'm trying to accomplish the following: I have several tables, some of them containing primary keys from other tables. I tried to prepare a SQLFiddle for clarification, you can find it here http://...
seph's user avatar
  • 694
0 votes
1 answer
565 views

I used the following query to return Primary Keys of two tables. Is there a similar way to query for the Foreign Keys? I am not familiar with creating DBs but I dont see any Foreign Keys defined in ...
user avatar

15 30 50 per page