Sql server ʱ¼ä¶Î²éѯ µÄÏà¹Ø·Ñ½âÎÊÌâ
sql server ʱ¼ä¶Î²éѯ¡£
==========================================
select g.borrowTime from t_apartment_goodsborrow g
where g.borrowTime >= '2010-03-11 9:50:43'
2010-03-11 9:52:54
----------------------------------------------------------------------------
select g.borrowTime from t_apartment_goodsborrow g
where g.borrowTime >= '2010-03-11 09:50:43'
2010-03-11 9:40:20
2010-03-11 9:52:54
ʵÖÊÉÏ ÈçÉÏ sql ÊÇ string µÄ ±È½Ï 9:40:20 > 09:50:43
Ïà¹ØÎĵµ£º
SQL Server 2005±¨ÁËÕâô¸ö´í£ºCannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "Chinese_PRC_90_CI_AS" in the like operation.
ºó²éÖ¤£¬ÕâÊÇÓÉÓÚÁ½¸ö×ö±È½ÏµÄÁеÄÅÅÐò·½Ê½²»Í¬£¬ÖÐÎÄÓкܶàÖÖÅÅÐò·½Ê½£¬¶ÔÓ¦ÈçÏ£º
ÖÐÎÄ£¨Ïã¸ÛÌØ±ðÐÐÕþÇø£©
Chinese_Hong_Kong_Stroke_90_CI_AS
ÖÐÎÄ£¨Ïã¸ÛÌØ±ðÐ ......
½ñÌìºÜÓôÃÆ,ʵÑéÊҵķþÎñÆ÷¶«Î÷¶¼Ã»ÓÐÁË,¶øÎÒµÄÊý¾Ý¿âÓÖÔÚÄÄÀï,ÎÒÓÖûÓб¸·Ý,°ÑÎÒÒÖÓôµÄÒªÃü,ÐÒ¿÷ÎÒÓõÄlinq to sql.×ÐϸÏëÏë,ËûµÄdbmlÎļþ»ù±¾°üº¬ÁËÊý¾Ý¿âµÄËùÓÐÄÚÈÝ,ËùÒÔ,Ò»¶¨Óа취´ÓdbmlÎļþÖд´½¨Êý¾Ý¿â!
Ñо¿ÁËÒ»¶ÎÊ ......
sql serverÖÐÈçºÎÅжϱí»òÕßÊý¾Ý¿âµÄ´æÔÚ£¬µ«ÔÚʵ¼ÊʹÓÃÖУ¬ÐèÅжÏStatus״̬λ£º
ÆäÖÐijЩ״̬λ¿ÉÓÉÓû§Ê¹Óà sp_dboption£¨read only¡¢dbo use only¡¢single user µÈ£©½øÐÐÉèÖãº
1 = autoclose£»Ê¹Óà sp_dboption ÉèÖᣠÊý¾Ý¿âÍêÈ«¹Ø±Õ£¬Æä×ÊÔ´ÔÚ×îºóÒ»¸öÓû§×¢ÏúºóÊÍ·Å¡£
4 = select into/bulkcopy£»Ê¹Óà sp_dbopti ......
Select * from t_user_profile where convert ( varchar ( 21 ),regDate, 120 ) like ' 2008-05-07% ' ±íÃû³Æ£ºt_user_profile ÈÕÆÚ×Ö¶ÎÃû³Æ£ºregDate
Select * from t_user_profile where convert(varchar(21),regDate,120) like '2008-05-07%'< ......