Sql query find the primary key ,foreign key relationship between tables
-
How to write query to find relationship between the primary key and foreign key re lation ship between the tables
Elaborate a bit more about your question. What database are you using?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
-
How to write query to find relationship between the primary key and foreign key re lation ship between the tables
Rmesh wrote:
How to write query to find relationship between the primary key and foreign key re lation ship between the tables
That depends on the database you are using. In SQL Server there are
sys*
tables andINFORMATION_SCHEMA
views that will allow you to get at this information.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." Ready to Give up - Your help will be much appreciated. My website
-
Rmesh wrote:
How to write query to find relationship between the primary key and foreign key re lation ship between the tables
That depends on the database you are using. In SQL Server there are
sys*
tables andINFORMATION_SCHEMA
views that will allow you to get at this information.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." Ready to Give up - Your help will be much appreciated. My website
Colin Angus Mackay wrote:
depends on the database you are using
That is why I asked earlier. easy in SQL, but I am not sure about Access. I've looked at some of the system table and it might be a little more work.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus