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

¡¾×ªÔØ¡¿SQL ServerÊý¾ÝÀàÐÍÏê½â

Êý¾ÝÀàÐÍÊÇÊý¾ÝµÄÒ»ÖÖÊôÐÔ£¬ÊÇÊý¾ÝËù±íʾÐÅÏ¢µÄÀàÐÍ¡£ÈκÎÒ»ÖÖÓïÑÔ¶¼ÓÐËü×Ô¼ºËù¹ÌÓеÄÊý¾ÝÀàÐÍ£¬SQL ServerÌṩһÏÂ25ÖÖ¹ÌÓеÄÊý¾ÝÀàÐÍ¡£
SQL ServerÊý¾ÝÀàÐÍÒ»ÀÀ±í
¡¡¡¡·Binary [(n)]
·Varbinary [(n)]
·Char [(n)]
·Varchar[(n)]
·Nchar[(n)]
·Nvarchar[(n)]
·Datetime
·Smalldatetime
·Decimal[(p[,s])]
·Numeric[(p[,s])]
·Float[(n)]
·Real
·Int
·Smallint
·Tinyint
·Money
·Smallmoney
·Bit
·Cursor
·Sysname
·Timestamp
·Uniqueidentifier
·Text
·Image
·Ntext
1¡¢¶þ½øÖÆÊý¾ÝÀàÐÍ£º
      ¶þ½øÖÆÊý¾ÝÓÉÊ®Áù½øÖÆÊý±íʾ£¬¿ÉÒÔʹÓà binary¡¢varbinary ºÍ image Êý¾ÝÀàÐÍ´æ´¢¡£
·binary ¹Ì¶¨³¤¶È£¨×î¶àΪ8K£©µÄ¶þ½øÖÆÊý¾ÝÀàÐÍ¡£
¡¡¡¡binary [ ( n ) ]
¹Ì¶¨³¤¶ÈµÄ n ¸ö×Ö½Ú¶þ½øÖÆÊý¾Ý¡£N ±ØÐë´Ó 1 µ½ 8,000¡£´æ´¢¿Õ¼ä´óСΪ n+4 ×Ö½Ú¡£
·varbinary ¿É±ä³¤¶È£¨×î¶àΪ8K£©µÄ¶þ½øÖÆÊý¾ÝÀàÐÍ¡£
¡¡¡¡varbinary [ ( n ) ]
       n ¸ö×ֽڱ䳤¶þ½øÖÆÊý¾Ý¡£n ±ØÐë´Ó 1 µ½ 8,000¡£´æ´¢¿Õ¼ä´óСΪʵ¼ÊÊäÈëÊý¾Ý³¤¶È +4
      ¸ö×Ö½Ú£¬¶ø²»ÊÇ n ¸ö×Ö½Ú¡£ÊäÈëµÄÊý¾Ý³¤¶È¿ÉÄÜΪ 0 ×Ö½Ú¡£ÔÚ SQL-92 ÖÐ varbinary µÄ
      ͬÒå´ÊΪ binary varying¡£
·image ÓÃÀ´´æ´¢³¤¶È³¬¹ý 8 KB µÄ¿É±ä³¤¶ÈµÄ¶þ½øÖÆÊý¾Ý¡£
      ³ý·ÇÊý¾Ý³¤¶È³¬¹ý 8KB£¬·ñÔòÒ»°ãÒËÓà varbinary ÀàÐÍÀ´´æ´¢¶þ½øÖÆÊý¾Ý¡£Ò»°ãÓÃÀ´´æ·Å Microsoft Word Îĵµ¡¢Microsoft Excel µç×Ó±í¸ñ¡¢°üº¬Î»Í¼µÄͼÏñ¡¢Í¼Ðν»»»¸ñʽ (GIF) ÎļþºÍÁªºÏͼÏñר¼Ò×é (JPEG) Îļþ¡£
      ÔÚ Image Êý¾ÝÀàÐÍÖд洢µÄÊý¾ÝÊÇÒÔλ×Ö·û´®´æ´¢µÄ£¬²»ÊÇÓÉ SQL Server ½âÊ͵ģ¬±ØÐëÓÉÓ¦ÓóÌÐòÀ´½âÊÍ¡£ÀýÈ磬ӦÓóÌÐò¿ÉÒÔʹÓÃBMP¡¢TIEF¡¢GIF ºÍ JPEG ¸ñʽ°ÑÊý¾Ý´æ´¢ÔÚ Image Êý¾ÝÀàÐÍÖС£
2¡¢×Ö·ûÊý¾ÝÀàÐÍ
      ×Ö·ûÊý¾ÝÓÉ×Öĸ¡¢·ûºÅºÍÊý×Ö×é³É¡£Ê¹Óà char¡¢varchar ºÍ text Êý¾ÝÀàÐÍ´æ´¢¡£
·char ¹Ì¶¨³¤¶È£¨²»³¬¹ý 8 KB£©µÄ×Ö·ûÊý¾ÝÀàÐÍ¡£
    &n


Ïà¹ØÎĵµ£º

SQL²éѯËÙ¶ÈÂýµÄÔ­Òò

1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ)
¡¡¡¡2¡¢I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
¡¡¡¡3¡¢Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£
¡¡¡¡4¡¢ÄÚ´æ²»×ã
¡¡¡¡5¡¢ÍøÂçËÙ¶ÈÂý
¡¡¡¡6¡¢²éѯ³öµÄÊý¾ÝÁ¿¹ý´ó(¿ÉÒÔ²ÉÓöà´Î²éѯ£¬ÆäËûµÄ·½·¨½µµÍÊý¾ÝÁ¿)
¡¡¡¡7¡¢Ëø»òÕßËÀËø(ÕâÒ²ÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐ ......

SQL Server 2005/2008 °²È«¼à¿Ø£¨´ýÐø£©

-- ²é¿´µ±Ç°dbµÄµÇ½
select * from sys.sql_logins
-- ÉóºËµÇ½Êý¾Ý¿âµÄÓû§
sql server managerment studioÖУ¬ÓÒ¼üµã¿ª·þÎñÆ÷µÄÊôÐÔ£¬ÔÚ°²È«ÐÔҳǩÖУ¬ Ñ¡ÖÐÉóºË“³É¹¦ºÍʧ°ÜµÄµÇ½”£¬ËùÓеǽ¶¼»áÔÚ..MSSQL\Log\ERRORLOGÖмǼһÌõ¼Ç¼¡£
Èç¹û¹´Ñ¡“ÆôÓÃC2ÉóºË¸ú×Ù”£¬½«»áÔÚ..MSSQL\Log\Ŀ¼ ......

SQL*Loader¿ØÖÆÎļþ

±¾ÎÄÕë¶ÔSQL*Loader¿ØÖÆÎļþ½øÐÐ˵Ã÷¡£
Ò»£ºSQL*Loader¿ØÖÆÎļþµÄÄÚÈÝ
SQL*Loader¿ØÖÆÎļþʹÓÃDDLÃüÁîÀ´¿ØÖÆSQL*Loader»á»°µÄÒÔÏÂÏîÄ¿£º
¡ñʹÓÃSQL*Loaderµ¼ÈëÊý¾ÝµÄλÖÃ
¡ñÊý¾Ý¸ñʽÉ趨·½·¨
¡ñµ¼ÈëÊý¾ÝʱSQL*LoaderµÄÉ趨¡££¨ÄÚ´æ¹ÜÀí¡¢±»¾Ü¾ø¼Ç¼¡¢µ¼Èë´¦ÀíµÄÖжϵȣ©
¡ñµ¼ÈëʱÊý¾ÝµÄ´¦Àí·½·¨
¿ØÖÆÎļþÀý£ºemp.ctl ......

sql ²éѯ±íµÄÁÐÃû row_number()

select upper(name) from syscolumns
where id =any
(
select Id from sysobjects where name='tb_city'
)
lower
select row_number() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É  ×ÔÔö  123
select rank() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É×ÔÔö123  ¸ù¾ÝÅ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ