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

SQL like×Ó¾äµÄÁíÒ»ÖÖʵÏÖ·½·¨,ËٶȱÈlike¿ì


SQL like×Ó¾äµÄÁíÒ»ÖÖʵÏÖ·½·¨,ËٶȱÈlike¿ì(ת)
Ò»°ãÀ´ËµÊ¹ÓÃÄ£ºý²éѯ£¬´ó¼Ò¶¼»áÏëµ½LIKE
select * from table where a like '%×Ö·û%'
Èç¹ûÒ»¸öSQLÓï¾äÖÐÓöà¸ö likeÄ£ºý²éѯ£¬²¢ÇҼǼÌõÊýºÜ´ó£¬ÄÇËÙ¶ÈÒ»¶¨»áºÜÂý¡£
ÏÂÃæÁ½ÖÖ·½·¨Ò²¿ÉʵÏÖÄ£ºý²éѯ£º
select * from table where patindex('%×Ö·û%',a)>0
select * from table where charindex('×Ö·û',a)>0
¾­²âÊÔÕâÁ½ÖÖ·½·¨±ÈLIKEËÙ¶ÈÒª¿ì¡£


Ïà¹ØÎĵµ£º

SQL Server´æ´¢¹ý³ÌÈëÃÅ°¸ÀýÏê½â

ÎÊÌâÌá³ö
¡¡¡¡ÎÒʹÓùý¼¸´ÎSQL Server£¬µ«ËùÓÐÓëÊý¾Ý¿âµÄ½»»¥¶¼ÊÇͨ¹ýÓ¦ÓóÌÐòµÄ±àÂëÀ´ÊµÏֵġ£ÎÒ²»Öªµ½ÔÚÄÄÀïʹÓô洢¹ý³Ì£¬Ò²²»Á˽âʵÏÖ´æ´¢¹ý³ÌÐèÒª×öÄÄЩ¹¤×÷¡£Ï£ÍûÄÜÏêϸ˵Ã÷¡£
¡¡¡¡×¨¼Ò´ðÒÉ
¡¡¡¡´æ´¢¹ý³ÌÊÇ´æ´¢ÓÚÊý¾Ý¿âÖеÄÒ»×éT-SQLÓï¾ä¡£ÓÐÁË´æ´¢¹ý³ÌÖ®ºó£¬ÓëÊý¾Ý¿âµÄ½»»¥¾ÍûÓбØÒªÔÚ³ÌÐòÖÐдһ¶ÑµÄSQLÓï¾ä£¬¶ ......

Óà SqlÌí¼Óɾ³ý×ֶΣ¬ÅжÏ×Ö¶ÎÊÇ·ñ´æÔڵķ½·¨

http://www.cnblogs.com/dwjaissk/archive/2006/07/25/459476.aspx
Ôö¼Ó×Ö¶Î
alter table docdsp  add dspcode char(200)
ɾ³ý×Ö¶Î
ALTER TABLE
table_NAME DROP COLUMN column_NAME
ÐÞ¸Ä×Ö¶ÎÀàÐÍ
ALTER TABLE table_name 
ALTER COLUMN column_name new_data_type
¸ÄÃû
sp_rename
¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐ ......

sql²»³£¼ûÓï¾ä»ã×Ü

1¡¢join
A±íµÄÖ÷¼üÊÇ×÷ΪB±íµÄÍâ¼ü¡£ÔÚ²éѯµÄʱºò£¬¿ÉÒÔͨ¹ý²»Í¬µÄjoin½«AºÍB±íÁ´½ÓÆðÀ´£¬´Ó¶øµÃµ½²»Í¬µÄ²éѯ½á¹û¡£
* JOIN: Èç¹û±íÖÐÓÐÖÁÉÙÒ»¸öÆ¥Å䣬Ôò·µ»ØÐÐ
* INNER JOIN: Èç¹ûÁ½¸ö±íÖÐÓÐÆ¥ÅäµÄ£¬Ôò·µ»ØÐР         
* LEFT JOIN: ¼´Ê¹ÓÒ±íÖÐûÓÐÆ¥Å䣬Ҳ´Ó×ó± ......

SQL Server 2008 R2 Ó¦Óü°¶à·þÎñÆ÷¹ÜÀí

Ëùν¶à·þÎñÆ÷¹ÜÀí (Multiserver Administration)¾ÍÊÇSQL Server 2008 R2ÌṩµÄ×Ô¶¯¹ÜÀí¶à¸ö SQL Server ʵÀý¹ý³ÌµÄ¹¦ÄÜ¡£ÔÚ¶à·þÎñÆ÷¹ÜÀíÖУ¬Á¬½Óµ½Ö÷·þÎñÆ÷²¢´ÓÆä½ÓÊÕ×÷ÒµµÄ·þÎñÆ÷±»³Æ֮ΪĿ±ê·þÎñÆ÷¡£SQL Server 2008 R2ÍƳöÁ˹ÜÀíSQL·þÎñÆ÷Êý¾Ý¿âÒýÇæµÄ¶à¸öʵÀýµÄSQL·þÎñÆ÷¹¤¾ß£¬Ê¹ÓÃÕâЩ¹¤¾ß¿ÉÒÔͨ¹ýÖÐÑë·þÎñÆ÷¶Ô¶à¸öSQL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ