Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLServerÖÐÎÄ´¦Àí

Ê×ÏȲå¾äÌâÍâ»°£º´´½¨Ò»¸ö×ÔÈ»Êý±íNums¡£ÕâÊÇ¡¶SQL Server 2005¼¼ÊõÄÚÄ»£ºT-SQL²éѯ¡·Ò»ÊéµÄ½¨Òé¡£
ÔÚSQL Server 2005ÖУ¬¿ÉÒÔ½èÓÃROW_NUMBERÅÅÃûº¯ÊýÇáËÉÉú³ÉÎÒÃÇËùÐèµÄ×ÔÈ»Êý±í£º
--×ÔÈ»Êý±í1-1M
CREATE TABLE Nums(n int NOT NULL PRIMARY KEY CLUSTERED)
WITH B1 AS(SELECT n=1 UNION ALL SELECT n=1), --2
B2 AS(SELECT n=1 from B1 a CROSS JOIN B1 b), --4
B3 AS(SELECT n=1 from B2 a CROSS JOIN B2 b), --16
B4 AS(SELECT n=1 from B3 a CROSS JOIN B3 b), --256
B5 AS(SELECT n=1 from B4 a CROSS JOIN B4 b), --65536
CTE AS(SELECT r=ROW_NUMBER() OVER(ORDER BY (SELECT 1)) from B5 a CROSS JOIN B3 b) --65536 * 16
INSERT INTO Nums(n)
SELECT TOP(1000000) r from CTE ORDER BY r
ÒÔÉÏÓï¾äÉú³ÉÇ°100Íò¸ö×ÔÈ»Êý¡£
ÒÔÏ¿ªÊ¼ÕýÌâ¡£
Ò»¡¢×Ö·û±àÂëÓëÅÅÐò¹æÔò
×ö¹ýWeb¿ª·¢µÄÈ˶Ô×Ö·û±àÂëÒ»¶¨²»Ä°Éú¡£¼òµ¥À´Ëµ£¬ÈËËùÄܹ»Ê¶±ðµÄ×Ö·ûÈç“A”¡¢“Ò»”Óë¼ÆËã»úÄÚ²¿²Ù×÷µÄÊý×Ö01000001¡¢1101001010111011ÊDz»Ò»ÑùµÄ£¬ÐèÒª½¨Á¢Ò»ÖÖ¶ÔÓ¦¹ØϵÀ´ÈüÆËã»úÄܹ»“ʶ±ð”ÈËÃÇËùʹÓõÄ×Ö·û£¨»òÕß˵ÊÇÈÃÈËÃÇÄܹ»ÓÃ×Ô¼ºÏ°¹ßµÄ·½Ê½Ê¶±ð¼ÆËã»ú²Ù×÷µÄÊý×Ö£©£¬×Ö·û±àÂë¾ÍÊÇÕâ¸ö¶ÔÓ¦¹Øϵ¡£
¶ÔÓÚÓ¢ÓïÀ´Ëµ£¬´óСд×Öĸ¼ÓÊý×Ö¼Ó±êµã·ûºÅ£¬×ܹ²Ò²²»»á³¬¹ý128¸ö£¬Ò»¸ö×ֽھ͹»ÓÃÁË£»ASCII±àÂëֻʹÓÃÁËÒ»¸ö×Ö½ÚÖеÄ7룬±ãÒѾ­°üÀ¨ÁËÓ¢Óï³£ÓÃ×Ö·û£¬»¹¼ÓÉÏÁËÒ»×éµç´«´ò×Ö»úʱ´úµÄ¿ØÖÆ×Ö·û£¨ÖÁ½ñÈÔÔÚʹÓÃÆäÖм¸¸ö£©¡£
È»¶øÊÀÉϲ¢²»½öÓÐÓ¢ÓŷÖÞһЩÓïÑÔÐèҪʹÓõÄһЩÖØÒô×Ö·û²¢Ã»ÓаüÀ¨ÔÚASCII±àÂëÖУ»¶øÑÇÖÞµÄCJK£¨Ö¸China+Japan+Korea£©ÓïÑÔ×Ö·û¶à´ï¼¸Íò¸ö£¬¸üÊÇÔ¶Ô¶³¬¹ýÁËÒ»¸ö×Ö½ÚËùÄܱíʾµÄ·¶Î§£»ÔÙ¼ÓÉÏ°¢À­²®Óϣ²®À´ÓïµÈµÈ……
½â¾ö°ì·¨×ÔÈ»ÊÇÀ©³ä×Ö·û±àÂëλÊý¡£Ë«×Ö½Ú¿ÉÒÔ±íʾ65536¸ö×Ö·û£¬Í¨³£Çé¿öÏÂÊÇ×ã¹»ÁË¡£µ«ÕâʱÓÖÓÐÒ»¸öеÄÎÊÌ⣺µ±¼ÆËã»ú¶Áµ½Á½¸öÁ¬ÐøµÄ×Ö½Ú£¬ËüÓ¦¸Ã½«Ö®Àí½âΪÁ½¸öµ¥¶ÀµÄ×Ö·û»¹ÊÇÒ»¸ö×Ö·û£¿±àÂë·½°¸ÐèÒª½â¾öÕâ¸öÎÊÌâ¡£
µÚÒ»ÖÖ·½°¸ÊÇ΢ÈíÒýÈëµÄ´úÂëÒ³µÄ¸ÅÄî¡£ASCIIֻʹÓÃÁËÒ»¸ö×Ö½ÚµÄ7룬×Ö½Ú×î¸ßλÊÇ0£¬ÄÇô¿ÉÒÔÓÃ×î¸ßλÊÇ1µÄ·¶Î§À´±íʾÀ©Õ¹×Ö·û¡£¶ÔÓÚ¶àÊýÅ·ÖÞÓïÑÔ£¬Ò»¸ö×Ö½ÚµÄ256¸ö×Ö·ûÒÑÈ»×ã¹»£¬ÄÇô±ãÓÃ×Ö½Ú×î¸ßλÊÇ1µÄ128¸ö×Ö·ûÀ´±íʾÈçÖØÒô×Ö·û¡¢ÖƱí·ûµÈÀ©Õ¹×Ö·û£»¶ÔÓÚÑÇÖÞÓïÑÔ£¬Ê¹ÓÃÁ½¸öÁ¬ÐøµÄ×î¸ßλÊÇ1µÄ×Ö½ÚÀ´±íʾCJK×Ö·û£¬ÕâÑù£¬µ±¼ÆËã»ú¶Áµ½Ò»¸ö×î¸ßλÊÇ0µ


Ïà¹ØÎĵµ£º

һЩSqlServerÓï¾ä

Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4¡¢Ëµ ......

[Òý]SQLServerºÍAccess¡¢ExcelÊý¾Ý´«Êä¼òµ¥×ܽá

http://www.tongyi.net/article/20031101/200311013786.shtml
ËùνµÄÊý¾Ý´«Ê䣬ÆäʵÊÇÖ¸SQLServer·ÃÎÊAccess¡¢Excel¼äµÄÊý¾Ý¡£
ΪʲôҪ¿¼Âǵ½Õâ¸öÎÊÌâÄØ£¿
ÓÉÓÚÀúÊ·µÄÔ­Òò£¬¿Í»§ÒÔÇ°µÄÊý¾ÝºÜ¶à¶¼ÊÇÔÚ´æÈëÔÚÎı¾Êý¾Ý¿âÖУ¬ÈçAcess¡¢Excel¡¢Foxpro¡£ÏÖÔÚϵͳÉý¼¶¼°Êý¾Ý¿â·þÎñÆ÷ÈçSQLServer¡¢ORACLEºó£¬¾­³£ÐèÒª·ÃÎÊÎı¾Êý ......

SQLSERVER´óÅúÁ¿Êý¾Ý²Ù×÷ʱËùÕ¼ÓÃÄÚ´æÊÍ...

ÏÖÏó£º
ÏÖÔÚ×öÒ»¸ö³ÌÐò£¬¶ÔÊý¾Ý¿âµÄ¼¸¸ö×°ÓдóÁ¿Êý¾ÝµÄ±í½øÐвÙ×÷£¬¶ÔÆäÖеÄÒ»¸ö±í½øÐÐ
Ñ­»·²Ù×÷£¬ÒÔ´¦ÀíÆäËûµÄ¼¸¸ö±í¡£ÆäÖÐÓõ½Á˼¸¸öquery,update£¬µ±³ÌÐòÅܵĹý³ÌÖУ¬
SQLSERVERµÄÄÚ´æ²»¶ÏµÄÔö³¤£¬ÅÜÍêºó¹Ø±Õ³ÌÐòÍ˳öºóÒ²²»½µÏÂÀ´¡£
½â¾ö£º
ÕâÊÇSQLµÄÄÚ´æ¹ÜÀí»úÖƾö¶¨µÄ£¬SQL¹ÜÀíÄÚ´æµÄÔ­ÔòÊÇÕâÑùµÄ,Ö»ÒªÄãµÄÄÚ´æ¹» ......

¹ØÓÚupdateÓï¾äÔÚsqlserverºÍAccessÖеĶԱÈ

sqlserver£ºupdate Table_A set Table_A.col1 = (select Table_B.col1 from Table_B where Table_A.col2 = Table_B.col2)
Access: UPDATE Table_ A, Table_B SET Table_ A.×Ö¶Î2 = Table_ B.×Ö¶Î2
WHERE Table_ A.񅧏=Table_ A.񅧏;
×Ô¼º¼ÇÏ£¬ÌáÐÑ×Ô¼º ......

MyEclipseÖÐÅäÖÃSQLServer 2005Êý¾Ý¿â


1.°²×°ºÃSQLServer 2005Êý¾Ý¿âÈí¼þ£¬½Ó×Å×îÖØÒªµÄ¾ÍÊÇ°²×°Êý¾Ý¿âÇý¶¯SQL Server 2005 driver for JDBC£¬¿ÉÒÔµ½:http://download.microsoft.com/download/8/B/D/8BDABAE2-B6EA-41D4-B903-7916EF3690EF/sqljdbc_1.2.2323.101_enu.exeÏÂÔØ
2.½«JDBC½âѹµ½ÈÎÒâµÄλÖã¬ÔÚ°²×°Ä¿Â¼ÀïÕÒµ½sqljdbc.jarÎļþ£¬ÒÔÇ°µÄÎÄÕÂÖÐÒѾ­½²¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ