¹ØÓÚSQL serverÖÐ×Ö¶ÎֵΪnullµÄ²éѯ
ijÌìÓиöͬÊÂÎÊÎÒÔõôÔÚÒ»¸ö±íÖвéÕÒij×Ö¶ÎֵΪnull²¢°ÑËüÌæ»»ÎªÁíÒ»Öµ¡£
¿ªÊ¼ÎÒ¾õµÃÓà select * from ±íÃû where ×Ö¶Î=null Ó¦¸Ã¿ÉÒԵġ£
µ«½á¹ûÊÇûÓб¨´í£¬µ«Ê²Ã´Ò²Ã»ÓÐÏÔʾ³öÀ´¡£
ºóÀ´ÓÖÊÔ£º¡¡
select * from ±íÃû where len(×Ö¶Î)=0 ½á¹ûÈÔÊÇʲôҲûÓÐÏÔʾ¡£
ÎÞÒâÖУ¬Óá¡¡¡select * from ±íÃû where ×ֶΡ¡is null È´¶ÔÁË¡£
¿´À´ºÃ¶à֪ʶÊÇÒª¶àÊÔ²ÅÄÜÖªµÀµÄ¡£ºÇºÇ¡£
±¾ÎÄÀ´Ô´ÓÚ WEB¿ª·¢Íø ÔÎÄÁ´½Ó£ºhttp://www.cncms.com.cn/mssql/1304.htm
Ïà¹ØÎĵµ£º
Ò»¡¢Í¨¹ýÆóÒµ¹ÜÀíÆ÷½øÐе¥¸öÊý¾Ý¿â±¸·Ý¡£´ò¿ªSQL SERVER ÆóÒµ¹ÜÀíÆ÷£¬Õ¹¿ªSQL SERVER×éLOCALϵÄÊý¾Ý¿â£¬ÓÒ¼üµã»÷ÄãÒª±¸·ÝµÄÊý¾Ý¿â£¬ÔÚµ¯³öµÄ²Ëµ¥ÖÐÑ¡ÔñËùÓÐÈÎÎñϵı¸·ÝÊý¾Ý¿â£¬µ¯³ö±¸·ÝÊý¾Ý¿â¶Ô»°¿ò£º
µã»÷Ìí¼Ó°´Å¥£¬Ìîд±¸·ÝÎļþµÄ·¾¶ºÍÎļþÃû£¬µã»÷È·¶¨Ìí¼Ó±¸·ÝÎļþ£¬µã»÷±¸·Ý¶Ô»°¿òÉϵı¸·Ý£¬¿ªÊ¼½øÐб¸·Ý¡£
&nbs ......
ÔÚ²éѯ·ÖÎöÆ÷ÒÔ“Îı¾ÏÔʾ½á¹û”·½·¨Ö´ÐÐ
exec UspOutputData ÄãµÄ±íÃû
µÃµ½µ¼³öÊý¾ÝµÄÓï¾ä£¬µ«image,text,ntext,sql_variant Áв»³öÏÖÔÚÓï¾ä£¬ÒÔºó¸Ä½ø¡£
´æ´¢¹ý³ÌUspOutputDataÈçÏ£º
CREATE PROCEDURE  ......
±¾ÈËдÁËÒ»¸öSQL²éѯ·ÖÎöÆ÷À©Õ¹¹¤¾ß£¬¹¦ÄÜÀàËÆDelphiµÄToDo¡£¿ÉÒÔ·½±ã¿ª·¢ÕßÔÚ´óÁ¿µÄSQL½Å±¾ÖпìËÙÕÒµ½Ã¿¸öÄ£¿é¡¢To-Do£¬´Ó¶øÌá¸ß¿ª·¢¸ßÀûÂÊ¡£
ʹÓõÄʱºòÏÈÔËÐÐSQL²éѯ·ÖÎöÆ÷£¬È»ºóÔËÐб¾³ÌÐò¼´¿É£¨¿ÉÒÔ¹¤¾ß|×Ô¶¨ÒåÖÐÅäÖã©¡£°´F2ÏÔʾTo-Do List´°¿Ú£¬°´Alt+F2ÔÚµ±Ç°Î»ÖòåÈëTo-Do¡£
ÓÉÓÚʱ¼ä¹ØÏµ£¬±¾³ÌÐò²¢Î´ÍêÉÆ£¬ÔÚË« ......
×ªÔØµØÖ·£ºhttp://langdorf.blog.163.com/blog/static/131177212200992981939316/
OracleµÄsql*plusÊÇÓëoracle½øÐн»»¥µÄ¿Í»§¶Ë¹¤¾ß¡£ÔÚsql*plusÖУ¬¿ÉÒÔÔËÐÐsql*plusÃüÁîÓësqlÓï¾ä¡£
ÎÒÃÇͨ³£Ëù˵µÄDML¡¢DDL¡¢DCLÓï¾ä¶¼ÊÇsqlÓï¾ä£¬ËüÃÇÖ´ÐÐÍêºó£¬¶¼¿ÉÒÔ±£´æÔÚÒ»¸ö±»³ÆÎªsql bufferµÄÄÚ´æÇøÓòÖУ¬²¢ÇÒÖ»Äܱ£´æÒ»Ì ......
ÀýÈç:
select getdate()
2004-09-12 11:06:08.177
Õâ¶ÔÓÚÔÚÒª²»Í¬Êý¾Ý¿â¼ä×ªÒÆÊý¾Ý»òÕßϰ¹ßoracleÈÕÆÚ¸ñʽYYYY-MM-DD HH24:MI:SSµÄÈ˶àÉÙÓÐЩ²»·½±ã.
ÎÒÕûÀíÁËÒ»ÏÂSQL ServerÀïÃæ¿ÉÄܾ³£»áÓõ½µÄÈÕÆÚ¸ñʽת»»·½·¨:
¾ÙÀýÈçÏÂ:
select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08
select replace(replac ......