Computer Videos Category
You are here: Home > Videos > SQL Server > Creating Database
Video title: Two (2) main methods of creating an SQL Server Database. |
|
|
|
|
Note For more information about backward compatibility with DISK INIT in Microsoft® SQL Server™ Backward Compatibility Details. SyntaxCREATE DATABASE database_name < filespec > ::= [ PRIMARY ] < filegroup > ::= FILEGROUP filegroup_name < filespec > [ ,...n ] You can use one CREATE DATABASE statement to create a database and the files that store the database. SQL Server implements the CREATE DATABASE statement in two steps:
Any user-defined objects in the model database are therefore copied to all newly created databases. You can add to the model database any objects, such as tables, views, stored procedures, data types, and so on, to be included in all databases. Each new database inherits the database option settings from the model database (unless FOR ATTACH is specified). For example, the database option select into/bulkcopy is set to OFF in model and any new databases you create. If you use ALTER DATABASE to change the options for the model database, these option settings are in effect for new databases you create. If FOR ATTACH is specified on the CREATE DATABASE statement, the new database inherits the database option settings of the original database. A maximum of 32,767 databases can be specified on a server. There are three types of files used to store a database:
. |
|
.png)

