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

SQL Server£º´æ´¢Í¼ÏñºÍBLOBÎļþ

SQL Server£º´æ´¢Í¼ÏñºÍBLOBÎļþ(Ò»)
 
×÷ÕߣºØýÃû ÎÄÕÂÀ´Ô´£ºOnegreen.Net ä¯ÀÀ´ÎÊý£º2559 ¸üÐÂʱ¼ä£º2008-5-25 23:16:09 
¡¡¡¡Ê²Ã´ÊÇBLOB
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÀ´±È½ÏÁ½ÖÖÎļþÀàÐÍASCIIºÍ¶þ½øÖÆ¡£´æ´¢ÔÚSQL ServerÖеĴ󲿷ÖÊý¾ÝÖµ¶¼ÊÇÓÉASCII(ÃÀ¹úÐÅÏ¢½»»»±ê×¼´úÂë)×Ö·û×é³É¡£¼òµ¥ËµÀ´£¬ASCII×Ö·û¾ÍÊÇÄܹ»ÔÚ¼ÆËã»ú¼üÅÌÉÏÕÒµ½µÄ×Öĸ¡¢Êý×ֺͷûºÅ¡£ÎÒÃÇ¿ÉÒÔͨ¹ý¼Çʱ¾µÈÎı¾±à¼­Æ÷¶ÔÖ»°üº¬ÁËASCII×Ö·ûµÄÎļþ½øÐÐÐÞ¸ÄÇÒ²»»á¶ÔÎļþÔì³ÉÈκÎÆÆ»µ¡£¶ø¶þ½øÖÆÎļþ£¬²»½ö°üº¬ÁËASCII×Ö·û£¬»¹°üº¬Á˼üÅÌÉÏûÓеÄÌØÊâ¿ØÖÆ×Ö·ûºÍ×Ö½Ú×éºÏ¡£Èç¹ûÄãÓüÇʱ¾´ò¿ªÒ»¸öMP3Îļþ£¬²¢É¾³ýÆäÖеÄһЩ×Ö·ûÆóͼʹ¸èÇú±ä¶Ì£¬ºÜ¿ÉÄÜ»áÆÆ»µµôÕû¸öÎļþ£¬µ¼Ö¸ÃMP3²»ÄÜÔÙÕý³£²¥·Å£¬ÕâÊÇÒòΪ¼Çʱ¾Ö»ÄÜÓÃÀ´±à¼­ASCII×Ö·û£¬¶øÎÞ·¨ÕýÈ·½âÎö»ò´´½¨¶þ½øÖÆλ¡£ÆäËû¶þ½øÖÆÊý¾Ý°üÀ¨Í¼ÏñºÍ¿ÉÖ´ÐÐÎļþ»ã±à³ÌÐò¡£BLOB¹ËÃû˼Òå¾ÍÊÇ´óÐ͵Ķþ½øÖÆÎļþ¡£
¡¡¡¡ÎªÊ²Ã´ÒªÔÚSQL Server´æ´¢BLOB
¡¡¡¡ÓÐÈËϲ»¶ÔÚSQL serverÊý¾Ý¿âÀï´æ´¢¶þ½øÖƶÔÏó£¬Ò²ÓÐÈË·´¶ÔÕâÑù×ö£¬ÕýËùν¹«Ëµ¹«ÓÐÀí£¬ÆÅ˵ÆÅÓÐÀí¡£ÎÒÃÇÓ¦µ±Á½·½Ã涼¿¼ÂÇÖÜÈ«¡£¾ÙÒ»¸ö¿´ÆðÀ´±È½ÏÕæʵµÄÀý×Ó£¬¼ÙÉèÎÒÃÇÔÚÒ»¸öµäÐ͵ÄÏúÊÛÆóÒµµ±Êý¾Ý¿â¹ÜÀíÔ±¡£Õâ¸öÆóҵͨ³£Óкܶà´ýÊ۵IJúÆ·Ïߣ¬°üº¬²»Í¬Àà±ðµÄ²úÆ·£¬¶ø²úÆ·ÏßÒÔϵÄˮƽ¾ÍÊǵ¥¸ö²úÆ·»ò²¿¼þ£¬ÎÒÃÇ°ÑËûÃdzÆ֮Ϊ¹¹¼þ¡£¶ÔÓÚÿ¸ö¹¹¼þ£¬¶¼ÌṩÁ˱ê×¼µÄÏêϸĿ¼Çåµ¥£¬Èç¼Û¸ñ¡¢³É±¾¡¢ÏÖÓÐÊýÁ¿¡¢¹©Ó¦É̵ȵȡ£´ËÍ⣬ºÜ¶à¹¹¼þ¿ÉÄÜ»¹ÓÐÓÃÀ´ÃèÊö¸Ã¹¹¼þÏúÊÛÊÖ²á»òÐû´«²á£¬ÕâЩÐû´«²áÍùÍùÒÔPDF¡¢»ÃµÆƬ»òijÖÖÀàÐ͵ÄͼÏñµÈµç×ÓÎĵµÐÎʽ³öÏÖ¡£´¦ÀíÕâЩµç×ÓÎĵµµÄÒ»¸ö·½·¨¾ÍÊÇ°ÑËûÃǶ¼·ÅÈëÒ»¸öÎļþ·þÎñÆ÷£¬²¢ÎªÃ¿¸ö¹¹¼þ´´½¨Ò»¸öĿ¼¡£Õâ¸öÒ»¿ªÊ¼¿ÉÄܹÜÓ㬲»¹ýµ±¿Í»§»ò¹ÍÔ±ÏëÒªÉè¼ÆÒ»¸ö¿ÉÒÔµ÷ÓÃÕâЩÎĵµµÄÓ¦ÓóÌÐò£¬Ö»ÐèÒªÊäÈëËÑË÷²ÎÊý¾Í¿ÉÒÔÈÃÊý¾Ý¿â·µ»ØÆ¥ÅäµÄÏúÊÛÊÖ²áʱ£¬ÎÊÌâ¾ÍÀ´ÁË¡£ÀýÈ磬ÊäÈë“ÏÔʾËùÓÐÊÛ¼ÛµÍÓÚ100ÔªµÄÀ¶É«¹¹¼þµÄÎĵµ”¡£Õâʱ£¬¾Í»áÉæ¼°µ½½«Ó¦ÓóÌÐòÓëÊý¾Ý¿â°ó¶¨µÄÎÊÌâÁË¡£Òò´Ë£¬ÔÚÕâ¸öϵÁÐÎÄÕµĺó°ë²¿·Ö£¬ÎÒÃǻᴴ½¨Ò»¸öÁ¬½Óµ½SQL ServerµÄVisual StudioÓ¦ÓóÌÐòÀ´¼ìË÷¹¹¼þÏúÊÛÊֲᡣ
¡¡¡¡Îļþ´æ´¢Î»ÖÃ
¡¡¡¡µÚÒ»¸öÐèÒª½â¾öµÄÎÊÌâÊÇÒª½«ÕâЩµç×ÓÐû´«Ð¡²á×Ó´æ·ÅÔÚÄÄÀï¡£ÎÒÃÇ¿ÉÒÔÓÃÒ»¸öÓ¦ÓóÌÐòÀ´´æ´¢µ¼Ïò¸ÃÎĵµµÄÎļþϵͳ·¾¶ÐÅÏ¢£¬ÀýÈç“e:saleswidgeta-picture.jpg”£¬½«ÕâЩÐÅÏ¢´æ·ÅÔÚvarcharÀàÐ͵ÄÊý¾ÝÁÐÀ¶ø°Ñʵ¼ÊµÄÎĵµ±£ÁôÔÚÎļþϵͳ;Ò²¿ÉÒ


Ïà¹ØÎĵµ£º

sqlÖеÄlike


Ö´ÐÐ Êý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºýÓï¾äÈçÏ£º
SELECT ×ֶΠfrom ±í WHERE ij×ֶΠLike Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥Åäģʽ£º
1£¬%£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëÔËÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_na ......

oracle PL SQLѧϰ°¸Àý£¨Èý£©

´æ´¢¹ý³Ì
========================================================================== 
========================================================================== 
¡¾ÑµÁ·15.1¡¿  ´´½¨Ò»¸öÏÔʾ¹ÍÔ±×ÜÈËÊýµÄ´æ´¢¹ý³Ì¡£
  ²½Öè1£ºµÇ¼SCOTTÕË»§(»òѧÉú¸öÈËÕË»§)¡£
  ²½Öè2£º ......

SQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(2)

ÎÄÕµ¼º½ SQL Server 2005 ѧϰ±Ê¼ÇϵÁÐÎÄÕµ¼º½
     ÔÚSQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(1) ÀïÎÒÃÇ˵Á˹ØÓÚPath£¬RawºÍAutoģʽµÄÓ÷¨£¬ÆäʵÀïÃæ²»½ö½ö ÊÇÕâЩ¼òµ¥µÄ²Ù×÷£¬»¹ÓÐһЩÆäËüµÄÌØÐÔ£¬±ÈÈç˵Type»òOpenXml·½·¨£¬sp_xml_preparedocument´æ´¢¹ý³Ì µÈÕâЩÔö¼ÓµÄ¶«¶«£¬ÎÒÃÇÀ´Ò» ......

sql server²éѯµ¼ÈëEXCEL


insert into OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 8.0;HDR=YES;DATABASE=c:\test.xls',sheet1$)
select * from ±íÃû
Èç¹ûÊÇÉú³Éexcel時ÓÃbcp
--µ¼³ö²éѯµÄÇé¿ö
EXEC master..xp_cmdshell 'bcp "SELECT au_fname, au_lname from pubs..authors ORDER BY au_lname" queryout "c:\test.xls" /c -/S"·þÎ ......

Ôõô½«ÏÂÃæµÄsql¸Ä³ÉHql£¿

select * from ((select bill.id billId,bach.riskRate risk,bach.assureRate assure from AcptBillInfo bill,AcptBach  bach where bill.acptBatchId=bach.id and bill.rgctId=? )abach left outer join AcptSignMoney sig on abach.billId = sig.billId) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ