SQL Beginner grooming and data types

Source: Internet
Author: User

Local or.:d Aibiao SQL linked to native server

NET start mssqlserver: Turn on Database startup
NET stop MSSQLSERVER: Shutting down the startup of the database
NET pause MSSQLServer: Server paused
NET continue MSSQLSERVER: Server continues
Login Name
sa account Right click, the property can change the password
. MDF: Database data files, all existing data files, and only one.
. LDF: The log file of the database, the operation of the database is automatically saved, and there is at least one.
Diagram of the database: Future help shows the relationship between tables and tables
Table: Store things through a table (right-click New table)
Views: Virtual tables created on the basis of tables that have data
Stored procedures: Help us to write data processing methods (can write logical thinking and operational directory)
Functions: Some built-in functions automatically help us with the data

File
Linked Object Explorer: Remotely link a database from another computer or your own computer

. sql: The programming language of the database
Debug: Can write data one by one debug

int: called Integer in Database

MSDN: Microsoft offers a series of introductions, help documentation (Baidu MSDN Library)

Data type

bigint long Integer (large shape, put whole number, large range)

Binary (50) binary

Bit boolean type (bytes)

char (10) Character type

Date type (Month day)

DateTime Date Time type (date plus time) ***********

DateTime2 (7)

DateTimeOffset (7)

Decimal (18, 0) decimals (double-precision floating-point numbers 18 and 0 have 18 digits before the decimal point, 0 digits after the decimal point, 18 and 0 can be changed) *********

float float (a single-precision floating-point number is less accurate than the one above) ******

Geography

Geometry

HierarchyID

Image sophomore binary type (images) ******

int integral type ***************

Money currency type (deposit, save, also count, can deposit currency symbol)

NCHAR (10) double-byte characters

ntext double-byte long text type (Word document can be stored directly inside, can save text)

Numeric (18, 0) numerical type

nvarchar (50) Double byte variable character type

nvarchar (MAX) double-byte unrestricted variable character type

Real decimal Type

smalldatetime Small Date Time type

smallint Small integer type

SmallMoney Small currency type

sql_variant

Text Long text ***********

Time (7)

Timestamp time stamp Type

tinyint micro-integer

uniqueidentifier

varbinary (50) variable binary type

varbinary (MAX) variable sophomore binary type

varchar (50) Variable string type (in a word, 50 for a string that can save 50 characters) * * * *

VARCHAR (max) variable unrestricted string type (max can change itself to a number and how many characters to save) * * *

XML (itself is a programming language, a markup language that can put some of the XML written in, save documents, data. XML fixed some information for development)

SQL Beginner grooming and data types

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.