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

ÇóÒ»sql£¿

SQL code:

--ÎÒµÄÒ»¸ö×Ö¶ÎΪֵΪNull
select * from table ORDER by type asc
--ÕâÊÇ type ÓпյÄ
-- »¹ÓÐNull
ÎÒÔõôÓÐÌõ¼þץȡֵNullµÄ¼ÇÂ¼ÄØ£¿


SQL code:
select * from table
where type is null
ORDER by type asc


where type is null

SQL code:
select * from table where type is null
ORDER by type asc


ÒýÓÃ
SQL code--ÎÒµÄÒ»¸ö×Ö¶ÎΪֵΪNullselect*fromtableORDERby typeasc--ÕâÊÇ type  ÓпյÄ-- »¹ÓÐNull  ÎÒÔõôÓÐÌõ¼þץȡֵNullµÄ¼ÇÂ¼ÄØ£¿


select * from table where type is not null ORDER by type asc

select * from table where type = '' or type is null ORDER by type asc


SQL code:
select * from tb where type is null order by type asc


SQL code:
select * from tb where type is null order by type desc


typeÊÇnull£¬ÄÇôºóÃæ


Ïà¹ØÎÊ´ð£º

sqlת»»ÎÊÌ⣬¼±£¡ - ÉçÇøÖ§³Ö / ¡¶³ÌÐòÔ±¡·ÔÓÖ¾

select convert(varchar(50),cast(convert(numeric(18,2),1275674000000/100000000)as real))+'ÒÚ'
select cast(convert(numeric(18,2),1275674000000/100000000)as real)
ΪʲôÉÏÒ»¸öÓÃvarcharת»»ºó¾ÍÖ»±£ÁôÁËÒ ......

Asp+sql serverÎÊÌâ - Web ¿ª·¢ / ASP

ÎÒÒ»¸öÏîÄ¿£¬Óиö²åÈë²Ù×÷£¬¾ßÌåÊÇÕâÑùµÄ£º
ÎÒÓнø»õÐÅÏ¢±í¡£ÔÚ³ö»õʱѡÔñÏàÓ¦µÄ½ø»õÐÅÏ¢£¬ÊäÈëÊýÁ¿£¬Ñ¡Ôñ²¿Ãź󣬵㱣´æ°´Å¥£¬ÓÉÓÚÍøÂçÑÓʱ£¬µãÒ»ÏÂûÓз´Ó³£¬ÓÚÊÇÓû§¾ÍÓÖµãһϣ¬µ¼ÖÂÒ»´Î²åÈëÁËÁ½Ìõ¼Ç¼:
Àý£º ......

oracleÖÐÒ»¸öSQLÓï¾äµÄÇø±ð - Oracle / »ù´¡ºÍ¹ÜÀí

OracleÖÐSQLÓï¾äÖÐ
drop table ±íÃû cascadeconstraints
Óë
drop table ±íÃû cascadeconstraint
ÓÐÊ²Ã´Çø±ð£¿
constraintºÍconstraintsÔÚoracleÖÐÊÇÒ»ÑùʹÓõÄ
¹Ù·½½¨ÒéʹÓÃconstraint

ÒýÓÃ
constraintºÍc ......

ÇóÒ»ÌõSQL - MS-SQL Server / ÒÉÄÑÎÊÌâ

--drop table #T1
--drop table #T2
create Table #T1(ID int,
QueryID nvarchar(20),
ResultID1 nvarchar(20),
ResultID2 nvarchar(20))
create Table #T2(SortNo int,
QueryID nvarchar(20),
ResultID1 nv ......

¹ØÓÚSQLµÄÎÊÌ⣿ - MS-SQL Server / »ù´¡Àà

Id Name Flag
1 ÕÅÈý 1  
2 ÍõÎå 3
3 ÕÅÈý 1
4 ÀîËÄ 2
5 ÕÅÈý 1
6 ÀîËÄ 2
ÎÒÏëÊä³öµÄʱºò±ä³ÉÕâÑù
Id Name Flag
1 ÕÅÈý 1 & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ