Managing Databases Using T-SQL

This section teaches you how to create, alter, and drop databases. The results of these T-SQL operations are the same as what you achieved using the ASD UI. The syntax will be familiar to you from your experience with standard SQL Server, although the options available are more restricted.

When you created your ASD server, the master system database was also generated for you. Whenever you execute a CREATE, ALTER, or DROP DATABASE command in T-SQL, as explained in the following examples, you must do so while in the context of master.

Creating Databases

When you create a database using T-SQL, it defaults to the Basic tier. You can, however, specify tier options using the EDITION, SERVICE_OBJECTIVE, and MAXSIZE

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.