代码改变世界

随笔分类 -  Oracle

SQL、Oracle中处理字符串函数

2012-07-03 17:59 by calm_水手, 893 阅读, 收藏,
摘要: 1.绝对值 SQL:select abs(-1) value O:select abs(-1) value from dual 2.取整(大) S:select ceiling(-1.001) value O:select ceil(-1.001) value from dual 3.取整(小) S:select floor(-1.001) value O:select floor(-1.001) value from dual 4.取整(截取) S:select cast(-1.002 as int) value O:select trunc(-1.002) value fro... 阅读全文

Oracle TO_DATE() 用法

2011-08-18 11:45 by calm_水手, 784 阅读, 收藏,
摘要: In Oracle/PLSQL, theto_datefunction converts a string to a date.The syntax for theto_datefunction is:to_date( string1, [ format_mask ], [ nls_language ] )string1is the string that will be converted to a date.format_maskis optional. This is the format that will be used to convertstring1to a date.nls_ 阅读全文