2014/11/19 SQL Server Basics

Source: Internet
Author: User
Tags mssqlserver

One, database service command line

net start mssqlserver→ to open the native database service

net stop mssqlserver→ the native database service

.... pause ..... → Pause ... continue ..... → Continue

Second, the file format

. mdf format: Database storage file, with only one, to save data.

. LDF format: Log file, automatic save operation Record, with and at least one.

. sql file: Edit the file for writing the database programming language.

III. Implications of the database

Data graphs: Showing relationships between all tables in a database

Table: Storing data

View: Create a virtual table based on a table

Programmable: 1. Stored procedures: The list of information in the database, you can write logical thinking and operation steps, and perform operations.

2. Trigger: A special stored procedure.

3. Functions: Built-in functions

Iv. Types of data

int: integer ( -2^31-2^31-1) bigine: Large integer ( -2^63-2^63-1)

Binary: Binary data

varbinary: binary string

Bit: bytes

CHAR (10): Character Nchaer: Small character

varchar (50): String (save 50 strings)

varchar (MAX): string (custom quantity)

Date: Day (month date) DateTime: Date (date + time)

Deciamal (18,0): decimal, double-precision floating-point number (18 digits before the decimal point, 0 digits)

float: decimal, single-precision floating-point number

Image: Images Money: Currency

Text: Texts (Common) ntext: text (not commonly used)

The Xml:xml itself is a programming language, where the format of the XML language can be stored.

Common Types of data:

Int,char (+), varchar (+), varchar (MAX), Datetime,deciamal,float,image,text

2014/11/19 SQL Server Basics

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.