Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

USE (SQL Server Compact Edition)

Changes the database context to the specified SQL Server 2005 Compact Edition (SQL Server Compact Edition) database. You use the USE statement to specify a SQL Server Compact Edition database file on which to query when using SQL Server Management Studio.

USE { [database] }  


The name of the database to which the user context is switched. Database names must conform to the rules for identifiers.

While enclosing the database name in brackets ([ and ]) is optional with SQL Server databases, it is required when you use SQL Server Compact Edition databases.

The following statement switches the database context to use a database file stored in the root directory of the C drive on the local computer.

USE [c:\MyNewDB.sdf]
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft