如何在SQL Server中获取当前/今天的日期数据
如何编写查询以获取今天的日期数据SQL server?
select * from tbl_name where date = <Todays_date>回答:
正确答案将取决于您的确切类型datecolumn。假设它是类型Date:
select * from tbl_name where datecolumn = cast(getdate() as Date)
如果是DateTime:
select * from tbl_name where cast(datecolumn as Date) = cast(getdate() as Date)
以上是 如何在SQL Server中获取当前/今天的日期数据 的全部内容, 来源链接: utcz.com/qa/403253.html

