查询当天: select * from info where DateDiff(dd,datetime,getdate())=0 查询24小时内: select * from info where DateDiff(hh,datetime,getDate())<=24 查询当天: select * from table where DateDiff(dd,datetime,getdate())=0 本月记录 : SELECT * FROM 表 WHERE datediff(month,[date
CREATE OR REPLACE PACKAGE PACK_KPI_KERNEL IS --定义多级数组 字符串 TYPE TSTRARRY ) INDEX BY BINARY_INTEGER; TYPE TSTRARRYARRY IS TABLE OF TSTRARRY INDEX BY BINARY_INTEGER; TYPE TSTRARRYARRYARRY IS TABLE OF TSTRARRYARRY INDEX BY BINARY_INTEGER; -- Author : D -
3.3.4 Retrieving Information from a Table Select 命令从表格中取回信息 SELECT what_to_select FROM which_table WHERE conditions_to_satisfy; what_to_select 是你想看到的结果,可以是一些列,也可以是“*“表示所有列,which_table是你想查找信息的目标表格,where是可选的,如果选了, conditions_to_satisfy是一个或者多个必须满足的条件. 3