SQLÓï¾ä²éѯÊÇ·ñΪ¿Õ =null¼°null
a b c d
980515 ¾«頂Æó業ÓÐÏÞ¹«Ë¾ 簡¼ÒºÀ NULL
980514 È«ÐÀľ業ÓÐÏÞ¹«Ë¾ NULL 123
980514 Ѹ億¿Æ¼¼¹É·ÝÓÐÏÞ¹«Ë¾ 簡·ê¿£ NULL
980515 聖Ô½國際Æó業ÓÐÏÞ¹«Ë¾ NULL 111
±í½á¹¹ÈçÉÏËùʾ£¬Òª²éѯCÁÐΪ¿ÕµÄ¼Ç¼µÄ£Ó£Ñ£ÌÓï¾ä²»ÊÇselect * from table where c=null; »òÕß select * from table where c=’’; ¶øÓ¦µ±ÊÇ select * from table where c is null; Ïà·´µØÒª²éѯ²»Îª¿ÕµÄÔòÓ¦µ±ÊÇ select * from talbe where c<>’’; »òÕß select * from table where c is not null; ×¢Ò⣺²»ÊÇnot is nullŶ¡£
Ïà¹ØÎĵµ£º
1¡¢¶¨ÒåÖ¸Á£ºusing System.Data.SqlClient;
2¡¢¶¨ÒåsqlÁ¬½Ó£º SqlConnection conn= new SqlConnection("server=(local);database=colorring;uid=sa;pwd=;");
3¡¢´ò¿ªsqlÁ¬½Ó£º conn.Open();
4¡¢¶¨ÒåsqlÓï¾ä£ºstring sqlstr = "insert into test values (123321)";
5¡¢×é×°sqlÓï¾äºÍÁ¬½Ó£ºSqlCommand cmd = new SqlCo ......
Create PROCEDURE [dbo].[ChangeObjectOwner]
@OldOwner as NVARCHAR(128),
@NewOwner as NVARCHAR(128)
AS
DECLARE @Name as NVARCHAR(128)
DECLARE @Owner as NVARCHAR(128)
DECLARE @OwnerName as NVARCHAR(128)
DECLARE curObject CURSOR FOR
select 'Name' = name,
'Owner'&n ......
http://inthirties.com:90/thread-1202-1-1.html
v$sqltext
´æ´¢µÄÊÇÍêÕûµÄSQL,SQL±»·Ö¸î
SQL> desc v$sqltext
Name Null? Type
----------------------------------------- -------- ----------------------------
ADDRESS ......
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
ÖÐÎÄ£¨Ïã¸ÛÌØ±ðÐ ......