Baidu Encyclopedia--microsoft Sqlsever
SQL is an abbreviation for the English Structured Query language, meaning Structured query language. The main function of the SQL language is to connect with various databases and communicate with each other. According to ANSI (National Standards Association), SQL is used as the standard language of the relational database management system. SQL Server is a relational database management system (DBMS) developed and promoted by Microsoft.
Login mode: Sqlsever Authentication account SA (default) password is set when installed
Build a table to build a library:
Create a new database table: the names of databases and tables should be meaningful and normalized.
New Database New Table
In the table:
Set Primary key:(unique identifier of one row of data;) Right click on the field setting to set the primary key;
Set the identity specification as Yes (increases automatically when data is added) ———— self-increment type
nvarchar (50) can hold 50 characters varchar (10) can save 5 Chinese in length; nvarchar (10) can store 10 hu Total Temperature
usage: If the field value is only English can choose varchar, and the field value exists more double-byte (Chinese, Korean, etc.) characters with nvarchar;
int: Shaping
float: Float type
DateTime: Date such as birthday, etc.
Bit: Boolean value
When the table is closed, right-click on the table design to edit the table
-----------------------------------------------Split-------------------------------------------------------------
The table content is added:
1, manually add the table data; ———— Sometimes you cannot modify table solutions: Tools option Designer prevents saving changes that require re-creation; remove tick
2, modified to execute (red exclamation) "" Note: the cursor field is not executed, it is best to remove the cursor in the execution;
--------------------------------------Expand-----------------------------------------
SQL statement Build Database build table field:
Build Library: CREATE DATABASE library set up a databases called library
Build table:
CREATE TABLE Users (
Uid int PRIMARY KEY,
UserName nvarchar () NOT NULL,
Userpwd nvarchar () NOT NULL
)
SQL statement Comments are two small dashes--
--The contents of the note
Microsoft sqlsever Database--Soft 1