SqlServer´æ´¢½á¹¹ÓëÒ»¸öË÷ÒýÎÊÌâ
SQL code:
CREATE TABLE TUser
(
FName CHAR(8000),
FAge INT,
FSex bit
)
INSERT INTO TUser
SELECT 'ÕÅÈý',18,1
UNION ALL
SELECT 'ÀîËÄ',20,1
UNION ALL
SELECT 'ÍõÎå',32,1
UNION ALL
SELECT 'Âé×Ó',23,1
²é¿´IOʹÓÃÇé¿ö
SQL code:
SET STATISTICS IO ON
SELECT * from TUser
(4 ÐÐÊÜÓ°Ïì)
±í 'TUser'¡£É¨Ãè¼ÆÊý 1£¬Âß¼¶ÁÈ¡ 4 ´Î£¬ÎïÀí¶ÁÈ¡ 0 ´Î£¬Ô¤¶Á 0 ´Î£¬lob Âß¼¶ÁÈ¡ 0 ´Î£¬lob ÎïÀí¶ÁÈ¡ 0 ´Î£¬lob Ô¤¶Á 0 ´Î¡£
Âß¼¶ÁÈ¡4´Î£¬¶ÁÁË4¸öÊý¾ÝPage,È»ºóÎÒÔٲ鿴ʹÓÿռä
SQL code:
EXEC sp_spaceused N'TUser'
dateΪ32K index_size Ϊ8k
µ«ÎÒ¶¼Ã»½¨Á¢Ë÷Òý,Ϊʲô»áÏÈ·ÖÅä8k
ÎÒÓÖ½¨Á¢Ë÷Òý
SQL code:
CREATE INDEX idx_age ON TUser(FAge)
È»ºóÔٲ鿴index_sizeΪ24K
ʹÓÃÏÂÃæ²éѯ£¬ÎÒ¿´ÁËÖ´ÐÐûÓÐÀûÓÃË÷ÒýɨÃè,ÊDZíɨÃè
SQL code:
SELECT * from TUser WHERE FAge=20
ÓÚÒÔÉÏÎÊÌ⣬ÄÄλ°ïÎÒ½â´ðÏ°ɣ¬ÑÏÖظ
Ïà¹ØÎÊ´ð£º
mysqlÓÐûÓÐÀàËÆsqlserverµÄÏûÏ¢´«µÝ¹¦ÄÜ
±ÈÈçÕë¶ÔdbÖ®¼äµÄ»¥Ïà·¢ÏûÏ¢¡¡£¨ÏûÏ¢´«µÝ£©
ûÓС£
³ý·ÇÄã×Ô¼º¸ÄдһÏÂMYSQLµÄÔ´´úÂëÈ»ºó±àÒëÔËÐС£
½èÖúÆäËûÓïÑÔ
Ä¿Ç°µÄmysqlÀïÃæÏÖ³ÉÕâÑùµÄ¹¦ÄÜ¡£
......
ÎÒÏëÔÚÁíһ̨»úÆ÷ÉÏ·ÃÎʱ¾»úµÄsqlserver 2005 ¸ÃÔõôÅäÖá£Òª·ÃÎʵĻúÆ÷°²×°ÁËsqlserver 2005ÓõIJÙ×÷ϵͳÊÇwindows 2003 £¬Òª½øÐÐÔ¶³Ì·ÃÎʵĻúÆ÷Ò²°²×°ÁËsqlserver 2005 ÓõIJÙ×÷ϵͳÊÇwindows £Ø£Ð¡£¸ÃÔõôÅäÖòÅÄ ......
ÈçÌâ
Ö»ÓÐ100·Ö¸øÁË¡£¡£¡£
ÄĸöÐÐÒµ£¿
ÎÒÏëÍøÉϵÄÔ´Âë¿Ï¶¨²»ÄÜÍêÈ«Âú×ã¸öÈËÏë·¨
×îºó»¹µÃ×Ô¼ºÕû
ÍƼöÒ»¿î×ÔÖú½¨Õ¾Èí¼þ£º·çѶ
C#+SQL
¿ÉÒÔÉè¼Æ³ö±È½ÏÁé»îµÄÍøÕ¾
ʲôÐÐÒµ°¡....
µ½51aspx.co ......
Êý¾Ý10WÌõÒÔÉÏ,wm6.5ƽ̨,ÄÚ´æÓÐÏÞ
C# code:
private void connserver()
{
Cursor.Current = Cursors.WaitCursor;
try
{
......
´úÂ룺
insert into openrowset('microsoft.ace.oledb.12.0','excel 12.0;hdr=yes;database=d:\a.xslx','select * from [sheet1$]') select * from table
×¢Ò⣺µ¼³öµÄÊý¾ÝºÍ±íÍ·ÒªÒ» ......