SQL ServerÖеÄNullÖµ½âÎö
NULL
ÊÇÊý¾Ý¿âÖÐÌØÓеÄÊý¾ÝÀàÐÍ£¬µ±Ò»Ìõ¼Ç¼µÄij¸öÁÐΪ
NULL
£¬Ôò±íʾÕâ¸öÁеÄÖµÊÇδ֪µÄ¡¢ÊDz»È·¶¨µÄ¡£¼ÈÈ»ÊÇδ֪µÄ£¬¾ÍÓÐÎÞÊýÖֵĿÉÄÜÐÔ¡£Òò´Ë£¬
NULL
²¢²»ÊÇÒ»¸öÈ·¶¨µÄÖµ¡£
ÕâÊÇ
NULL
µÄÓÉÀ´¡¢Ò²ÊÇ
NULL
µÄ»ù´¡£¬ËùÓкÍ
NULL
Ïà¹ØµÄ²Ù×÷µÄ½á¹û¶¼¿ÉÒÔ´Ó
NULL
µÄ¸ÅÄîÍƵ¼³öÀ´¡£
ÅжÏÒ»¸ö×Ö¶ÎÊÇ·ñΪ
NULL
£¬
Ó¦¸ÃÓÃ
IS
NULL
»ò
IS NOT NULL
£¬¶ø²»ÄÜÓÃ
‘=’
¡£¶Ô
NULL
µÄÅжÏÖ»Äܶ¨ÐÔ£¬¼ÈÊDz»ÊÇ
NULL
£¨
IS NULL/IS NOT NULL
£©£¬¶ø²»Äܶ¨Öµ¡£¼òµ¥µÄ˵£¬ÓÉÓÚ
NULL
´æÔÚ×ÅÎÞÊýµÄ¿ÉÄÜ£¬Òò´ËÁ½¸ö
NULL
²»ÊÇÏàµÈµÄ¹Øϵ£¬Í¬ÑùÒ²²»ÄÜ˵Á½¸ö
NULL
¾Í²»ÏàµÈ£¬»òÕ߱ȽÏÁ½¸ö
NULL
µÄ´óС£¬ÕâЩ²Ù×÷¶¼ÊÇûÓÐÒâÒ壬µÃ²»µ½Ò»¸öÈ·ÇеĴ𰸵ġ£Òò´Ë£¬¶Ô
NULL
µÄ
=
¡¢
!=
¡¢
>
¡¢
<
¡¢
>=
¡¢
<=
µÈ²Ù×÷µÄ½á¹û
¶¼ÊÇδ֪µÄ£¬Ò²¾ÍËã˵£¬ÕâЩ²Ù×÷µÄ½á¹ûÈÔÈ»ÊÇ
NULL
¡£
ͬÀí£¬¶Ô
NULL
½øÐÐ
+
¡¢
-
¡¢
*
¡¢
/
µÈ²Ù×÷µÄ½á¹ûÒ²ÊÇδ֪µÄ£¬ËùÒÔÒ²ÊÇ
NULL
¡£
ËùÒÔ£¬ºÜ¶àʱºò»áÕâÑù×ܽá
NULL
£¬³ýÁË
IS NULL
¡¢
IS NOT NULL
ÒÔÍ⣬¶Ô
NULL
µÄÈκβÙ×÷µÄ½á¹û»¹ÊÇ
NULL
¡£
ÏÂÃæÁоÙÁË
SQL
Server
Öд¦Àí
null
ֵʱÈÝÒ׺öÂԵļ¸¸öµØ·½¡£
ÔÚÔĶÁÏÂÎÄ֮ǰ£¬ÇëÏÈ´´½¨Ê¾Àý±í£¬
Script
ÈçÏ£º
create
table
dbo.
cassaba_null
(
column1 nvarchar
(
50)
not
null,
column2 nvarchar
(
50)
null
)
go
insert
into
dbo.
cassaba_null values
(
'1'
,
null)
insert
into
dbo.
cassaba_null values
(
'2'
,
'string'
)
insert
into
dbo.
cassaba_null values
(
'3'
,
''
)
go
1.
ʹÓÃ
=null
/ <>null
ß×£¬¿ªÆª²»¾Í˵²»ÄÜʹÓÃ
=null / <> null
À´ÅжÏ
null
ÖµÂð£¿Êǵģ¬Ä¬È
Ïà¹ØÎĵµ£º
ʹÓÃPL/SQL developerÔ¶³Ì·ÃÎÊoracleÊý¾Ý¿âʱ£¬Ê×ÏÈҪȷ¶¨±¾»úÖÐ×°ÓÐoracle¿Í»§¶Ë¡£Ä¿Ç°»¹²»ÖªµÀÄÄÀïµ¥¶ÀµÄoracle¿Í»§¶Ë°²×°°ü¡££¨ÒòΪÎÒÓõÄÊÇoracle10g£¬oracle10g°²×°µÄ¹ý³ÌÖÐûÓÐÌض¨µÄ¿Í»§¶ËÑ¡ÏËùÒÔÎÒÒ»°ã¶¼ÊÇÔÚ±¾»úÓð²×°oracleËùÓй¦ÄÜ£©
ÔÚ±¾»ú°²×°ºÃoracle¿Í»§¶Ëºó£¬ÎÒÃÇÔÚ±¾»ú(¼´¿Í»§¶Ë)µÄoracleµÄ°²×°Ä¿Â¼Ï ......
µÚÒ»ÖÖ£º
public void deleteUser(String byemail) {
Session session = getSession();
Transaction transaction = null;
String hql = "delete from Register where email=?
";
try {
transaction = session.beginTransactio ......
¹Ì¶¨ÈÕÆÚ¼õÒ»¸öÔ£¨ÈÕ¡¢Ä꣩
dateadd(±í´ïʽ1£¬±í´ïʽ2£¬±í´ïʽ3£©
±í´ïʽ1ΪMM»òYY»òDD
±í´ïʽ2Ϊ1
±í´ïʽ3ΪҪ¼õµÄÈÕÆÚ Ò»¸öÔµĵÚÒ»Ìì µÚÒ»¸öÀý×Ó£¬ÎÒ½«¸æËßÄãÈçºÎ´Óµ±Ç°ÈÕÆÚÈ¥Õâ¸öÔµÄ×îºóÒ»Ìì¡£Çë×¢Ò⣺Õâ¸öÀý×ÓÒÔ¼°ÕâƪÎÄÕÂÖеÄÆäËûÀý×Ó¶¼½«Ö»Ê¹ÓÃDATEDIFFºÍDATEADDº¯ÊýÀ´¼ÆËãÎÒÃÇÏëÒªµÄÈÕ ......
Ò».×¢ÊÍ
-- µ¥ÐÐ×¢ÊÍ£¬´ÓÕâµ½±¾ÐнáÊøΪעÊÍsql Óï·¨£¬ÀàËÆC++£¬c#ÖÐ//
/* ¡ */ ¶àÐÐ×¢ÊÍ£¬ÀàËÆC++£¬C#ÖÐ/* ¡ */
¶þ.±äÁ¿£¨int£¬ smallint£¬ tinyint£¬ decimal£¬float£¬real£¬ money £¬smallmoneysql Óï·¨£¬ text £¬image£¬ char£¬ varchar¡£¡£¡£¡£¡£¡££©
Óï·¨£º
DECLARE
&nb ......
Ê×Ïȸø³öÁ½ÕŲâÊÔ±í
a(aid int, adata varchar(20)) b(bid int, bdata varchar(20))
1.join Óë inner join
Ö´ÐÐÈçÏÂÓï¾ä£º
select * from a join b on a.aid = b.bid;
ÎÒÃÇ»áµÃµ½ÈçϵĽá¹û£º
AID ADAT ......