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

SQLº¯Êý left()¡¢charindex()µÄʹÓÃ

SQLº¯Êý left()¡¢charindex()µÄʹÓÃ
1¡¢left()
LEFT (<character_expression>£¬ <integer_expression>)
·µ»Øcharacter_expression ×óÆð integer_expression ¸ö×Ö·û¡£
2.charindex()
·µ»Ø×Ö·û´®ÖÐij¸öÖ¸¶¨µÄ×Ó´®³öÏֵĿªÊ¼Î»Öá£
CHARINDEX (<’substring_expression’>£¬ <expression>)
ÆäÖÐsubstring _expression ÊÇËùÒª²éÕÒµÄ×Ö·û±í´ïʽ£¬expression ¿ÉΪ×Ö·û´®Ò²¿ÉΪÁÐÃû±í´ïʽ¡£Èç¹ûûÓз¢ÏÖ×Ó´®£¬Ôò·µ»Ø0 Öµ¡£
´Ëº¯Êý²»ÄÜÓÃÓÚTEXT ºÍIMAGE Êý¾ÝÀàÐÍ¡£
ÓÐÈçϱítest
ҪʵÏÖÈçÏÂÊý¾ÝЧ¹û£º
ÔòÐèleft ()Óëcharindex£¨£© ÕâÁ½¸öº¯Êý¡£¡£¡£
select left(t_cont,CHARINDEX(':',t_cont)-1) as content from test where t_cont like '%:%'


Ïà¹ØÎĵµ£º

SQL LIKE ͨÅä·ûËæ±Ê £¨SqlServer£©

ͨÅä·û ˵Ã÷
_    ÓëÈÎÒâµ¥×Ö·ûÆ¥Åä
 
%    Óë°üº¬Ò»¸ö»ò¶à¸ö×Ö·ûµÄ×Ö·û´®Æ¥Åä
 
[ ]  ÓëÌض¨·¶Î§£¨ÀýÈ磬[a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[abcdef]£©ÖеÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
 
[^]  ÓëÌض¨·¶Î§£¨ÀýÈ磬[^a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[^abcdef]£©Ö®ÍâµÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
......

ÈçºÎ×¥µ½jdbcÁ¬½ÓµÄËùÖ´ÐеÄsqlÓï¾ä

ÎÒÃÇͨ³£ÔÚ¶¨Î»Êý¾Ý¿âËøÎÊÌâʱ£¬Í¨³£Ï£ÍûÕÒµ½Äĸö½ø³Ì·¢³öÁËÄĸöÓï¾ä£¬ËøסÁËÄÄÕÅ±í£¬Ò»°ãÎÒÃÇͨ¹ý²év$lock£¬È»ºóÕÒµ½sid,ÔÙµ½v$sesionÀïÕÒµ½Õâ¸ö½ø³ÌµÄhash_value»òpre_hash_value,È»ºó¸ù¾Ýhash_value¶¨Î»µ½¾ßÌåµÄÓï¾ä¡£
¿ÉÊÇ£¬ÎÒÃÇ·¢ÏÖ£¬Í¨¹ýJDBCÁ¬½ÓÉÏÀ´µÄ½ø³Ì£¬ËüµÄhash_valueÊÇ0,ËùÒÔÎÒÃǾÍÎÞ·¨¶¨Î»Õâ¸ö½ø³ÌÖ´ÐеÄÓï¾ ......

Óû§saµÇ¼ʧ°Ü,¸ÃÓû§Óë¿ÉÐÅsql serverÁ¬½ÓÎÞ¹ØÁª

½ñÌì²âÊÔwebÏîĿн¨ÁËÒ»¸öÊý¾Ý¿â£¬½á¹û±¨´í,ÒÔÇ°µÇ¼ֱ½ÓÑ¡Ôñ'WindowsÉí·ÝÑéÖ¤',²¢Ã»ÓÐʲôÎÊÌâ³öÏÖ!¿ÉÇ°¶Îʱ¼ä²ÉÓÃ'SQLSERVERÉí·ÝÑéÖ¤'È¥µÇ¼,ËæÖ®µÄÎÊÌâ¾ÍÀ´ÁË.ÎÞÂÛÓÃʲô·½·¨¾ÍÊÇÒ»¸ö½á¹û³ö´í! ³ö´íµÄÔ­ÒòÊÇ:'Óû§ 'sa' µÇ¼ʧ°Ü¡£¸ÃÓû§Óë¿ÉÐÅ SQL Server Á¬½ÓÎÞ¹ØÁª'.½ñÌìÉÏÍøÉϲéÁË°ëÌ컹ÊǸ㲻¶¨,×îºó¾­¹ýÍøÉϺÍÊéÉ ......

sql sever 2005 saĬÈÏÃÜÂëÊǶàÉÙ

Ê×ÏÈ£¬ÓÃwindows Éí·ÝÑéÖ¤ µÇ½ sql server 2005
ÒÀ´ÎÕ¹¿ª 
°²È«ÐÔ->µÇ¼Ãû
Ñ¡ÖÐ sa ÓÒ¼üµ¥»÷
Ñ¡ÖÐ ÊôÐÔ
µ¯³ö sa µÄÊôÐÔ¶Ô»°¿ò
¾ÍÔÚÃÜÂë´¦ ¸Ä ÃÜÂë ÐÐÁË
¸ÄÁËÃÜÂëºó Óà sa ºÍ Äã¸ÄµÄÃÜÂëµÇ½
Èç¹û»¹µÇ½²»ÉÏ
¾ÍÊÇÄãû´ò¿ª sql serverºÍ windowsÉí·ÝÑéÖ¤
ºÍûÊÚÓè sa µÇ½ȨÏÞ
½â¾ö°ì·¨ÈçÏÂ
£º£º£º£º ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ