Showing posts with label foreign. Show all posts
Showing posts with label foreign. Show all posts

Friday, February 24, 2012

How to query SQL CE database schema

What are some basic commands to query information about a CE database schema. I'd like to see my foreign keys etc. Where can I find this information in BOL?

Look for the INFORMATION_SCHEMA keyword. This allows you to query the database schema through SQL. For instance, you get the list of tables with this:

Code Snippet

SELECT * FROM INFORMATION_SCHEMA.TABLES

|||The documentation is available here: http://technet.microsoft.com/en-us/library/ms174156.aspx