当前位置:网站首页>Oracle/PLSQL: Cast Function
Oracle/PLSQL: Cast Function
2022-06-27 01:35:00 【yuanlnet】
In Oracle/PLSQL, the cast function converts one datatype to another.
Syntax
The syntax for the cast function is:
cast ( { expr | ( subquery ) | MULTISET ( subquery ) } AS type_name )
Note
The following casts are allowed:
TO | FROM | |||||
char, varchar2 | number | datetime / interval | raw | rowid, urowid | nchar, nvarchar2 | |
char, varchar2 | X | X | X | X | X | |
number | X | X | ||||
datetime / interval | X | X | ||||
raw | X | X | ||||
rowid, urowid | X | X | ||||
nchar, nvarchar2 | X | X | X | X | X | |
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i
For Example
select cast( '22-Aug-2003' AS varchar2(30) )
from dual;
This would convert the date (ie: 22-Aug-2003) into a varchar2(30) value.
边栏推荐
- 【毕业季】角色转换
- Addition, deletion, modification and query of ymal file
- idea 插件开发一些异常处理
- Visual introduction to Matplotlib and plotnine
- 按键控制LED状态翻转
- Kept to implement redis autofailover (redisha) 17
- Find the minimum value in the rotation sort array ii[classical Abstract dichotomy + how to break the game left, middle and right are equal]
- Interface test framework practice (I) | requests and interface request construction
- getReader() has already been called for this request
- NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
猜你喜欢

递归是会更秀strtok

Two days of beautiful butterfly animation

Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk

Learn the most basic operation of discodiffusion

简单学习GoogleColab的入门级概念

Simply learn the entry-level concepts of googlecolab
![Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]](/img/cc/a0be58eddc72c22a9a6ee5c61eb81a.png)
Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]

idea 插件开发一些异常处理

Online text digit recognition list summation tool

可视化介绍 Matplotlib 和 Plotnine
随机推荐
I encountered some problems when connecting to the database. How can I solve them?
Learn the most basic operation of discodiffusion
在线文本数字识别列表求和工具
Meituan: data management and pit avoidance strategy summarized after stepping on Thunder for several years
可视化介绍 Matplotlib 和 Plotnine
hibernate 根据方言生成sql
Memcached foundation 5
使用NetworkX对社交网络进行系统的分析:Facebook网络分析案例
buuctf-pwn write-ups (6)
自定义类加载器对类加密解密
Custom class loader encrypts and decrypts classes
为什么先划分训练集和测试集后归一化?
markdown表格(合并)
Ymal文件的增删改查
XSS notes (Part 2)
BS-GX-016基于SSM实现教材管理系统
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
你的case真的pass了吗?
XSS笔记(下)
Summary of working at home during the epidemic | community essay solicitation