1.getdate()內值函數的使用,用於獲取當前時間,如某一個表中有一列爲uqdatetime:顯示這裏以詩句的最後更新時間。語句爲:
update persons set updatetime=GETDATE () 其中persons是表updatetime是欄位。注意:這裏的表updatetime是早就建好了的
2.在表中增加一個欄位:alter table persons add updatetime datetime 其中datetime是數據類型
3.修改表的某一列數據的數據類型:alter table persons alter column updatetime datetime
4.isnull()函數 :用於排除列爲null干擾時所用 isnull(列名,0)意思爲該列爲null時返回0.
where customer="條件1"or customer="條件2"
group by customer
having sum(orderprice)>1500