当前位置:网站首页>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.
边栏推荐
- Arbre binaire OJ sujet
- Custom class loader encrypts and decrypts classes
- The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
- getReader() has already been called for this request
- George Washington University: Hanhan Zhou | PAC: auxiliary value factor decomposition with counterfactual prediction in Multi-Agent Reinforcement Learning
- Esp32 add multi directory custom component
- Meituan: data management and pit avoidance strategy summarized after stepping on Thunder for several years
- 对象的访问机制及其他
- UVM in UVM_ report_ Enabled usage
- 30 MySQL tutorial MySQL storage engine overview
猜你喜欢

为什么传递SPIF_SENDCHANGE标志SystemParametersInfo会挂起?

你的case真的pass了吗?

Amazon elasticache quickly builds a cache service cluster, which is fast

Meituan: data management and pit avoidance strategy summarized after stepping on Thunder for several years

Learn the most basic operation of discodiffusion

浏览器缓存

The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry

福元医药上市在即:募资净额将达到16亿元,胡柏藩为实际控制人

ThreadLocal详解

uvm中的config机制方法总结(二)
随机推荐
On the operation mechanism of numpy array
flutter系列之:flutter中的flow
Summary of working at home during the epidemic | community essay solicitation
get_sequencer的用法总结
Recursion will make strtok more attractive
Due to the invalidation of the prospectus of bori technology, CICC has stopped providing guidance to it and abandoned the listing on the Hong Kong stock exchange?
memcached基础7
Modeling specifications: environment settings
Two days of beautiful butterfly animation
UVM in reporting classes_ report_ Get of server_ severity_ Count and get_ Server usage
XSS笔记(下)
Kept to implement redis autofailover (redisha) 16
Keepalived 实现 Redis AutoFailover (RedisHA)12
在 IDEA 里看个书很过分嘛!
Binary tree OJ problem
Kept to implement redis autofailover (redisha) 13
Find the minimum value in the rotation sort array ii[classical Abstract dichotomy + how to break the game left, middle and right are equal]
30 MySQL tutorial MySQL storage engine overview
memcached基础2
乔治·华盛顿大学 : Hanhan Zhou | PAC:多智能体强化学习中具有反事实预测的辅助价值因子分解