SQL Server 2008ÐÂÌØÐÔ£Êý¾ÝѹËõ
Êý¾ÝѹËõ£¨Data Compression£©ÊÇSQL Server 2008ÒýÈëµÄÐÂÌØÐÔÖ®Ò»£¬ÕâÏî¼¼ÊõʹÊý¾Ý¸üÓÐЧµÄ±£´æ²¢ÇÒ¼«´ó¼õÉÙÁË´æ´¢¿ªÏú£¬Í¬Ê±Ò²´øÀ´ÁËÐÔÄÜÉϵÄÏÔÖøÌá¸ß£¬ÓÈÆäÊǶÔÐèÒª´óÁ¿´ÅÅÌI/OµÄÊý¾Ý²Ö¿â¡£
×¢£ºÆäʵÔÚSQL Server 2005 SP2°æ±¾ÖУ¬ÒѾÒýÈëÁË vardecimal £¬ËüʹÓñ䳤µÄ¸ñʽ´æ´¢¶¨³¤µÄdecimalºÍnumbericÊý¾Ý¡£
SQL Server 2008Ö§³ÖÁ½ÖÖÊý¾ÝѹËõ£ºÐÐѹËõ£¨Row Compression£©ºÍÒ³ÃæÑ¹Ëõ£¨Page Compression£©¡£
Êý¾ÝѹËõ½öÔÚÆóÒµ°æºÍ¿ª·¢°æÖпÉÓá£
ÐÐѹËõ½«¶¨³¤µÄ×Ö¶ÎÒԱ䳤µÄÎïÀí¿Õ¼äÀ´´æ´¢£¬´Ó¶ø½ÚÊ¡ÁË´æ´¢¿Õ¼ä¡£
ÀýÈ磬¶¨³¤µÄ×Ö¶Îchar£¨100£©Öд洢“SQL Server 2008”Ö»ÐèÒª15×Ö·ûµÄ³¤¶È£¬¶ø·Ç100×Ö·û£¬´Ó¶ø½ÚÔ¼ÁË85%µÄ¿Õ¼ä£¬ÁíÍ⣬¶ÔÓÚ0ºÍnull£¬½«²»Õ¼Óô洢¿Õ¼ä¡£
ÐÐѹËõϸ÷ÀàÐÍÊý¾ÝµÄ¿Õ¼äÕ¼Óãº
Êý¾ÝÀàÐÍ
ÊÇ·ñÓ°Ïì
ϸ½Ú
tinyint
No
1 byte is the minimum storage needed.
smallint
Yes
If the value fits in 1 byte, only 1 byte will be used.
int
Yes
Uses only the bytes that are needed. For example, if a value can be stored in 1 byte, storage will take only 1 byte.
bigint
Yes
Uses only the bytes that are needed. For example, if a value can be stored in 1 byte, storage will take only 1 byte.
decimal
Yes
This storage is exactly same as the vardecimal storage format. For more information, see Storing Decimal Data As Variable Length.
numeric
Yes
This storage is exactly same as the vardecimal storage format. For more information, see Storing Decimal Data As Variable Length.
bit
Yes
The metadata overhead brings this to 4 bits.
smallmoney
Yes
Uses the integer data representation by using a 4-byte integer. Currency value is multiplied by 10000 and the resulting integer value is stored by removing any digits after the decimal point. This type has a storage optimization similar to that for integer types.
money
Yes
Uses the integer data representation by using an 8-byte integer. Currency value is multiplied by 10000 and the resulting integer value is stored by removing any digits after the decimal point. This type has a larger range than smallmoney. This type
Ïà¹ØÎĵµ£º
ÒªÔÚSQL ServerÊý¾Ý¿âÖд洢m³²¢´òÓ¡³öÀ´, ·½·¨ÈçÏ£º
1£©½«Êý¾Ý¿âÖÐÏàÓ¦×ֶεÄÊý¾ÝÀàÐÍÉèΪnchar»ònvarcharÀàÐÍ¡£
2£©´ÓExcelÖеõ½m³£¬¸´ÖÆÕ³Ìùµ½½ÓÊÕÊý¾ÝµÄ¿Ø¼þÖУ¨TextBox¡¢DataGridViewµÈ£©¡£±£´æ¼´¿É¡£
×¢£º1£©nchar,nvarcharÓëchar,varcharµ ......
內Á¬½Ó½öÑ¡³öÁ½ÕűíÖл¥ÏàÆ¥ÅäµÄ¼Ç¼£®Òò´Ë£¬Õâ»áµ¼ÖÂÓÐʱÎÒÃÇÐèÒªµÄ¼Ç¼ûÓаüº¬½øÀ´¡£
Ϊ¸üºÃµÄÀí½âÕâ¸ö¸ÅÄÎÒÃǽéÉÜÁ½¸ö±í×÷ÑÝʾ¡£ËÕ¸ñÀ¼Òé»áÖеÄÕþµ³±í(party)ºÍÒéÔ±±í(msp)¡£¸´ÖÆÄÚÈݵ½¼ôÌù°å´úÂë:
party(Code,Name,Leader)
Code: Õþµ³´úÂë
Name: Õþµ³Ãû³Æ
Leader: Õþµ³ÁìÐä
msp(Nam ......
ÔÚmysqlÖÐÖ´ÐÐsqlÎļþ£¨Èçtest.sql£©µÄ³£Ó÷½·¨
ΪÁË·½±ã£¬¿ÉÒÔ½«mysqlµÄ°²×°Â·¾¶ÏÂbinĿ¼µÄµØÖ··Åµ½»·¾³±äÁ¿PATHÖУ¬Èç;C:\Program Files\MySQL\MySQL Server 5.0\bin¡£ÕâÑùÔÚÈÎÒâλÖôò¿ªµÄÃüÁîÐгÌÐò¶¼ÄÜÕÒµ½mysql.exe¡£
¿ÉÒÔ´ò¿ªmysqlÃüÁîÐУ¬Ò²¿ÉÒÔÔÚÃüÁîÐÐÖÐͨ¹ýmysql -u r ......
Copy ÒÔÏÂÄÚÈݵ½²éѯ·ÖÎöÆ÷²Ù×÷£º
-- 3 ****************************************************
-- ÊìϤϵͳ×Ô´øµÄһЩº¯Êý
-- 3.1 --------------------------------------------------
-- Êýѧº¯Êý
-- ABS(num_expression) ·µ»Ø¸ø¶¨ÊýÖµ±í´ïʽµÄ¾ø¶ÔÖµ
-- C ......
1. ¼òµ¥ÐðÊöSQL Server 2000µÄ°²È«ÈÏÖ¤¹ý³Ì¡£
´ð£ºSQL Server 2000ÖУ¬ÏµÍ³Óüì²é¿ÚÁî¡¢ÉèÖýÇÉ«¡¢Ðí¿ÉµÈÊÖ¶ÎÀ´¼ì²éÓû§µÄÉí·Ý¼°Ê¹ÓÃȨÏÞ¡£ºÏ·¨µÄÓû§²ÅÄܽøÈëÊý¾Ý¿âϵͳ£¬µ±Óû§¶ÔÊý¾Ý¿âÖ´ÐвÙ×÷ʱ£¬ÏµÍ³×Ô¶¯¼ì²éÓû§ÊÇ·ñÓÐȨÏÞÖ´ÐÐÕâЩ²Ù×÷¡£Ò»¸öÓû§Èç¹ûÒª·ÃÎÊSQL ServerÊý¾Ý¿âÖеÄÊý¾Ý£¬Ëû±ØÐëÒª¾¹ýÈý¸öÈÏÖ¤¹ý³Ì¡£
£ ......