首页 \ 问答 \ Discuz应该怎样如何开启Gzip压缩

Discuz应该怎样如何开启Gzip压缩

更新时间:2022-07-28 07:07

最满意答案

1.select trunc(sysdate) from dual  --2011-3-18  今天的日期为2011-3-18
2.select trunc(sysdate, 'mm')   from   dual  --2011-3-1    返回当月第一天.
3.select trunc(sysdate,'yy') from dual  --2011-1-1       返回当年第一天
4.select trunc(sysdate,'dd') from dual  --2011-3-18    返回当前年月日
5.select trunc(sysdate,'yyyy') from dual  --2011-1-1   返回当年第一天
6.select trunc(sysdate,'d') from dual  --2011-3-13 (星期天)返回当前星期的第一天
7.select trunc(sysdate, 'hh') from dual   --2011-3-18 14:00:00   当前时间为14:41   
8.select trunc(sysdate, 'mi') from dual  --2011-3-18 14:41:00   TRUNC()函数没有秒的精确

其他回答

你的“ss” 定义了一个列名 其实不用加引号
select trunc(sysdate,'day') ss from table
在这里的trunc 是取得本周的第一天
如果仅仅写trunc(sysydate)不使用参数表示截取到日

给你举个例子:
 select trunc(sysdate,'dd') aa,trunc(sysdate,'mm') bb,trunc(sysdate,'yyyy') cc,trunc(sysdate,'day')from dual;
得到的结果:
  aa             bb          cc         trunc(sysdate,'day')
2010-8-11    2010-8-1   2010-1-1  2010-8-8

aa列得到当天,bb列得到当月第一天,cc列得到当年第一天,trunc(sysdate,'day')列(在查询时没有定义列名)得到本周第一天

相关问答

更多
  • 查看包中函数、过程的SQL语句: SELECT owner,name,text,line FROM DBA_SOURCE where type = 'PACKAGE' and (TEXT like ' procedure%' or TEXT like ' function%'); 结果中,owenr:哪个用户的,name:哪个包,text:函数名及部分参数,line:行位置 如果要看到全部参数,看line,然后+1、+2...就可以看到 查看函数、过程的SQL语句: SELECT OWNER,NAME,TY ...
  • oracle函数[2023-03-19]

    和 UNION 指令类似, INTERSECT 也是对两个 SQL 语句所产生的结果做处理的。不同的地方是, UNION 基本上是一个 OR (如果这个值存在于第一句或是第二句,它就会被选出),而 INTERSECT 则比较像 AND ( 这个值要存在于第一句和第二句才会被选出)。 UNION 是联集,而 INTERSECT 是交集 INTERSECT 的语法如下: [SQL语句 1] INTERSECT [SQL语句 2] 假设我们有以下的两个表格, A表格 Place Price Date Los An ...
  • Oracle DECODE函数 使用方法: 1、比较大小 select decode(sign(变量1-变量2),-1,变量1,变量2) from dual; --取较小值 sign()函数根据某个值是0、正数还是负数,分别返回0、1、-1 例如: 变量1=10,变量2=20 则sign(变量1-变量2)返回-1,decode解码结果为“变量1”,达到了取较小值的目的。 2、此函数用在SQL语句中,功能介绍如下: Decode函数与一系列嵌套的 IF-THEN-ELSE语句相似。base_exp与compa ...
  • 这个1不没关系的,exists是存在的检查,只要有记录就行了
  • oracle函数[2022-08-15]

    和 UNION 指令类似, INTERSECT 也是对两个 SQL 语句所产生的结果做处理的。不同的地方是, UNION 基本上是一个 OR (如果这个值存在于第一句或是第二句,它就会被选出),而 INTERSECT 则比较像 AND ( 这个值要存在于第一句和第二句才会被选出)。 UNION 是联集,而 INTERSECT 是交集 INTERSECT 的语法如下: [SQL语句 1] INTERSECT [SQL语句 2] 假设我们有以下的两个表格, A表格 Place Price Date Los An ...
  • 1.select trunc(sysdate) from dual --2011-3-18 今天的日期为2011-3-18 2.select trunc(sysdate, 'mm') from dual --2011-3-1 返回当月第一天. 3.select trunc(sysdate,'yy') from dual --2011-1-1 返回当年第一天 4.select trunc(sysdate,'dd') from dual --2011-3-18 返回当前年月日 5.select trunc(sy ...
  • SELECT REPLACE('JACK and JUE','J','BL') "Changes" FROM DUAL; Changes -------------- BLACK and BLUE
  • 要截断到四分之一,请参阅在SQL Server中截断日期的最佳方法是什么? SELECT DATEADD(Q, DATEDIFF(Q, 0, convert(datetime,'1-dec-2017')), 0) 加五个月。 SELECT DATEADD(M, 5, DATEADD(Q, DATEDIFF(Q, 0, convert(datetime,'1-dec-2017')), 0)) 减去一天 SELECT DATEADD(M, 5, DATEADD(Q, DATEDIFF(Q, 0, conve ...
  • 您正在使用TRUNC功能而没有第二个格式参数。 因此,Oracle会将您的日期截断为一整天,从而将时间部分设置为0:00:00 am。 但是,您的WHERE条件会选择1到2 pm之间的时间,这些日期都不会满足。 You are using the TRUNC function without the second format parameter. Therefore, Oracle truncates your date to a full day, thus setting the time part ...
  • 来自Oracle参考: https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions201.htm TRUNC( 日期 )函数返回日期,截断日期的时间部分为格式模型fmt指定的单位。 该功能对NLS_ CALENDAR会话参数不敏感。 它按照公历的规则运作。 即使您为日期指定了不同的日期时间数据类型,返回的值始终为数据类型DATE 。 From Oracle reference: https://docs.oracle.com/cd/B19 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)