空字符串与Null 在oracle和MASSQl 中的区别

Oracle中没有空字符串概念 只有Null,而MSSQL 中是区分这两种概念.


Oracle:
 select RECORDID,CounterpartySector from UnsecuredInflow where ReferenceDate = to_date('31-MAY-16','DD-MON-RR') and  currency='AUD';


RECORDID COUNTERPARTYSECTOR


1 Other Financial Entity
2 Other Financial Entity
17 Other
20 Supervised Non-Bank Financial Entity
21
22 Other Financial Entity
23 Other Financial Entity
37 Other
40 Supervised Non-Bank Financial Entity
41
45 Other Financial Entity


select CounterpartySector from UnsecuredInflow where ReferenceDate = to_date('31-MAY-16','DD-MON-RR') and  currency='AUD' group by CounterpartySector


COUNTERPARTYSECTOR


Supervised Non-Bank Financial Entity

Other Financial Entity
Other




MSSQL:
select CounterpartySector from UnsecuredInflow where ReferenceDate = to_date('31-MAY-16','DD-MON-RR') and  currency='AUD' group by CounterpartySector


NULL

Other
Other Financial Entity
no string
Supervised Non-Bank Financial Entity





你可能感兴趣的:(空字符串与Null 在oracle和MASSQl 中的区别)