1.sql server 查詢字段不為null的所有數據:
首先會想到 select * from table where column<>null //錯誤 null 在數據庫中代表空 不能用來比較
專門用於比較為null,不為null的關鍵詞 is not null,is null
select * from table where column is not null //正確
2.c# 字段屬性 想從一個字段的屬性去控制另一個字段的值
字段:private int num;
屬性:public int num{get;set;}
字段能存儲數據,屬性不行。