.


:




:

































 

 

 

 


SQL Server




 

 


 

SQL SERVER.

. New Database Databases. Create Database Wizard (Tools\Wizards\Database\).

1. .
2. ( ) .

 

3. .
4. ( ) .

 

5. .

.

. New Table . , . , . .

 


 

/
1. .
2. .
3. , , .
  , , , 30 .
5. .
6. .
7. , .

.

/
1. Bigint (8 ) ( ) -2*1063 2*1063-1
  Int (4 ) -2*1031 2*1031-1
  Smallint (2 -32768 32767
4. tinyint (1 ) 0 255
5/ decimal(p,s) 5 17 -1038+1 1038-1 .
6. numeruc(p,s) decimal. decimal numeric .

 

int decimal. int smallint., tinyint/

.

/
1. Float(p) 4 8, , decimal
2. Real(p) float, , SQL-92

.

/
1. Money 8
2. Smallmoney 4 -2147483648 214 7483647

/
1. Datetime 8 1.01.1753 31.12.9999
2. Smalldatetime 4 1.01.1900 6.06.2079.

.

ANSI UNICODE.

ANSI , . , . , . , , .

UNICODE. . ANSI. , ANSI 2 , ANSI- . UNICODE n. , ANSI char, UNICODE nchar. , char(10) 10 , nchar(10) - 5 .

 

/ . -
1. char(n) 1-8000 8000 ANSI .
2. nchar(n) 2-8000 4000 Unicode .
3. varchar(n) 1-8000 8000 ANSI .
4. nvarchar(n) 2-8000 4000 Unicode .
  varchar(max) 2 1.073741824 ANSI
5. nvarchar(max) 2 536870912 Unicode .
6. text 2 1.073741824 ANSI
7. ntext 2 536870912 Unicode

 

char, nchar , varchar? Nvarchar , . text, ntext . , . . - varchar(max) nvarchar(max). text .

/
1. binary(n) 1-8000 .
2. varbinary(n) 1-8000 .
3. varbinary(max) 2 .
4. image 2

 

binary/nbinary SQL SERVER. image , Word, Excel, Pdf, Visio, , 2. varbinary(max) ( 2005 ) , image , binary/nbinary.

.

/
1. bit 0,1 NULL TRUE 1, FALSE 0..
2. timestamp . - , . timestamp, . .
3. uniqueidentifer 16- GUID - , .
4. Sql_variant . . 8 .
5. cursor , , . .
6. table , . , .
7/ xml , , . xml-

 

 


 

29 : , ,

. , .

MS SQL SERVER : . , . , , . . SQL SERVER MANAGMENT STUDIO CREATE INDEX WIZARD, TABLE DESIGNER, PROPERTIES. .

 


 





:


: 2016-07-29; !; : 809 |


:

:

, .
==> ...

1919 - | 1746 -


© 2015-2024 lektsii.org - -

: 0.016 .