sqlserver時(shí)間函數(shù)DATEDIFF介紹
select * from ShopOrder where datediff(week,ordTime,getdate()-1)=0?? //查詢當(dāng)天日期在一周年的數(shù)據(jù) select * from ShopOrder where dated...
select * from ShopOrder where datediff(week,ordTime,getdate()-1)=0?? //查詢當(dāng)天日期在一周年的數(shù)據(jù) select * from ShopOrder where dated...
SQL中可以使用WHERE子句來查詢某個(gè)時(shí)間段的數(shù)據(jù)。具體的語法如下: SELECT 列名1, 列名2, ... FROM 表名 WHERE 時(shí)間列名 >= 開始時(shí)間 AND 時(shí)間列名 <= 結(jié)束時(shí)間; 其中,時(shí)間列名是指包含日...