SQL ServerÖи÷Êý¾ÝÀàÐͳߴ磨Byte£©
Êý¾ÝÀàÐÍ
´æ´¢³ß´ç
ÃèÊö
bigint
8 bytes
¡¡
integer
4 bytes
¡¡
smallint
2 bytes
¡¡
tinyint
1 byte
¡¡
bit
1 byte
¡¡
numeric(p,s)
decimal(p,s)
dec(p,s)
19 bytes
¡¡
money
8 bytes
¡¡
float
8 bytes
¡¡
real
4 bytes
¡¡
datetime
8 bytes
¡¡
nvarchar(n)
2*³¤¶È bytes
¡¡
ntext
2*³¤¶È bytes
¡¡
nchar
2*³¤¶È bytes
¡¡
binary(n)
³¤¶È bytes
¡¡
varbinary(n)
³¤¶È bytes
¡¡
image
³¤¶È bytes
¡¡
uniqueidentifier
16 bytes
¡¡
IDENTIFY[(s,i)]
-
¡¡
ROWGUIDCOL
-
¡¡
Timestamp/rowversion
8 bytes
¡¡
Ïà¹ØÎĵµ£º
ÓÉÓÚVBAÖдú±íµ¥¸öºÍ¶à¸ö×Ö·ûÊÇÓá°?¡±ºÍ¡°*¡±´ú±íµÄ£¬ËùÒÔÐí¶à¸ÕѧADOµÄÅóÓѾ³£»áÎÊ£ºÎªÊ²Ã´ÔÚSQLÓï¾äÖÐÕâÁ½¸ö·ûºÅ²»ÄÜÓÃÄØ£¿Ó¦¸ÃÓÃʲô·ûºÅÀ´´ú±íÄØ£¿ ÕâÊÇÒòΪVBA+ADOËùÓõÄÇý¶¯µÄ¹Øϵ£¬±¾È˶ÔÕâ¸öÒ²²»ÊÇÌ«¾«£¬¾ßÌå´ó¼Ò¿ÉÒÔȥ΢ÈíµÄÍøÕ¾ÉÏÕÒÕҴ𰸣¬ËùÒÔVBA+ADOµÄSQLÓï¾äÖеġ°*¡±ºÍ¡°?¡±ÕâÁ½¸ö·ûºÅÊÇÓá°%¡±ºÍ¡°_¡±£¬ ......
SQL INNER JOIN ¹Ø¼ü×Ö
SQL INNER JOIN ¹Ø¼ü×Ö
ÔÚ±íÖдæÔÚÖÁÉÙÒ»¸öÆ¥Åäʱ£¬INNER JOIN ¹Ø¼ü×Ö·µ»ØÐС£
INNER JOIN ¹Ø¼ü×ÖÓï·¨
SELECT column_name(s)
from table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name
×¢ÊÍ£ºINNER JOIN Óë JOIN ÊÇÏàͬµÄ¡£
ÔʼµÄ±í (ÓÃÔÚÀ ......
SQL RIGHT JOIN ¹Ø¼ü×Ö
SQL RIGHT JOIN ¹Ø¼ü×Ö
RIGHT JOIN ¹Ø¼ü×Ö»áÓÒ±í (table_name2) ÄÇÀï·µ»ØËùÓеÄÐУ¬¼´Ê¹ÔÚ×ó±í (table_name1) ÖÐûÓÐÆ¥ÅäµÄÐС£
RIGHT JOIN ¹Ø¼ü×ÖÓï·¨
SELECT column_name(s)
from table_name1
RIGHT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
×¢ÊÍ£ºÔÚijЩÊý ......
´æ´¢¹ý³Ì
Óŵ㣺
1.ÓÉÓÚÓ¦ÓóÌÐòËæ×Åʱ¼äÍÆÒƻ᲻¶Ï¸ü¸Ä£¬Ôöɾ¹¦ÄÜ£¬T£SQL¹ý³Ì´úÂë»á±äµÃ¸ü¸´ÔÓ£¬StoredProcedureΪ·â×°´Ë´úÂëÌṩÁËÒ»¸öÌ滻λÖá£
2.Ö´Ðмƻ®£¨´æ´¢¹ý³ÌÔÚÊ×´ÎÔËÐÐʱ½«±»±àÒ룬Õ⽫²úÉúÒ»¸öÖ´Ðмƻ®££ ʵ¼ÊÉÏÊÇ Microsoft SQL ServerΪÔÚ´æ´¢¹ý³ÌÖлñÈ¡ÓÉ T-SQL Ö¸¶¨µÄ½á¹û¶ø±ØÐë²ÉÈ¡µÄ²½ÖèµÄ¼Ç¼ ......
×î½üÔÚ×ömysqlµÄÐÔÄÜÓÇ»¯£¬×öµ½¶à±íÁ¬½Ó²éѯ£¬±È½ÏÍ·ÌÛ£¬¿´ÁËһЩjoinµÄ×ÊÁÏ£¬ÖÕÓڸ㶨£¬ÕâÀï·ÖÏí³öÀ´£¡
ÍâÁª½Ó¡£ÍâÁª½Ó¿ÉÒÔÊÇ×óÏòÍâÁª½Ó¡¢ÓÒÏòÍâÁª½Ó»òÍêÕûÍⲿÁª½Ó¡£
ÔÚ from ×Ó¾äÖÐÖ¸¶¨ÍâÁª½Óʱ£¬¿ÉÒÔÓÉÏÂÁм¸×é¹Ø¼ü×ÖÖеÄÒ»×éÖ¸¶¨£º
&n ......