Home > Database > Oracle > body text

Introduction to simple methods of format conversion in Oracle

藏色散人
Release: 2020-05-11 17:06:21
forward
2482 people have browsed it

Introduction to simple methods of format conversion in Oracle

1.to_number()

select to_number('2015') from dual ---2015
Copy after login

2.to_char()

--不需要转换格式

select to_char(2015) from dual ---'2015'
Copy after login

--需要转换格式

select to_char(1, '$000') from dual --- $001
select to_char(2212, '$999999') from dual ---$2212
Copy after login

3.to_date()

---必须提供匹配的时间格式

---例子

select to_date('2015/04/04 08:00:00','yyyy-MM-dd  HH24:MI:SS') from dual
Copy after login

Oracle相关介绍:

Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。它是在数据库领域一直处于领先地位的产品。可以说Oracle数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的、适应高吞吐量的数据库方案。

The above is the detailed content of Introduction to simple methods of format conversion in Oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!