SQL SERVER 2012 Chapter fifth Creating and modifying a data table のcreate statement

Source: Internet
Author: User

CREATE <object type> <object name>

CREATE DATABASE <database name>

A more complete list of syntax: log files and database files are not placed on a disk, scramble for disk IO, and compromise security.

CREATE DATABASE <database name>
[On [PRIMARY]
([NAME = < ' logical file NAME ';,]
FILENAME = < ' file name ' >
[, SIZE = <size in Kilobytes,megabytes,gigabytes,or terabytes>]
[, MAXSIZE = <size in Kilobytes,megabytes,gigabytes,or terabytes>]
[, filegrowth = <kilobytes,megabytes,gigabytes,or terabytes|percentage>]]
[LOG on
([NAME = < ' logical file NAME ';,]
FILENAME = < ' file name ' >
[, SIZE = <size in Kilobytes,megabytes,gigabytes,or terabytes>]
[, MAXSIZE = <size in Kilobytes,megabytes,gigabytes,or terabytes>]
[, filegrowth = <kilobytes,megabytes,gigabytes,or terabytes|percentage>]]
[Containment = off| PARTIAL]
[COLLATE <collation Name>]
[For ATTACH [with <service Broker>] | For Attch_rebuild_log | With Db_chaining on| Off| Trustworthy on| OFF]----need to practice
[As SNAPSHOT of <source database Name>]
[;]

Actual combat:

CREATE DATABASE Accounting
On
(
NAME = ' Accounting ',
FILENAME = ' D:\AccountingData.mdf ',
SIZE = 10,
MAXSIZE = 50,
FileGrowth = 5
)
LOG on
(
NAME = ' Accountinglog ',
FILENAME = ' D:\AccountingLog.ldf ',
SIZE = 5MB,
MAXSIZE = 25MB,
FileGrowth = 5MB
)

Sp_help

sp_helpdb

sp_helpdb ' dbname '

SQL SERVER 2012 Chapter fifth Creating and modifying a data table のcreate statement

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.