Collections:
"USE" - Setting the Current Database in SQL Server
How to set the current database in SQL Server?
✍: FYIcenter.com
Once you are connected to the SQL Server, you should select a database to work with and set it as the current database using the "USE" statement with this syntax:
USE database_name
The following tutorial example shows you how to set "FyiCenterData" as the current database, and create a table in "FyiCenterData":
USE FyiCenterData GO Changed database context to 'FyiCenterData'. CREATE TABLE Links (Name NVARCHAR(32)) GO SELECT name, type_desc, create_date FROM sys.tables GO name type_desc create_date Links USER_TABLE 2007-05-19 23:05:43.700
⇒ "DROP DATABASE" - Deleting Databases in SQL Server
⇐ Simplest Way To Create New Databases in SQL Server
2016-11-24, 4560🔥, 0💬
Popular Posts:
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
How to continue to the next iteration of a WHILE loop in SQL Server Transact-SQL? How to use CONTINU...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...