惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - 景天

[转]mysql sql 百万级数据库优化方案 left outer join Ext.extend 【转】C#中文排序(拼音和笔画) Ext中Checkbox的注意事项 - 景天 - 博客园 表单从服务器端读取 [转]关于project2003中几个视图的认识 Oracle 常用数据字典、外键查询 Oracle 10 回收站 C++ 字符串替换 ASP.NET MVC beta 模板(Templates) 中文修正补丁 完整版 Oracle备份数据库的脚本 RadioButtonList的选择确认 Oracle 10g 笔记1 连接和SQL编写 .NET调用Oracle存储过程,使用数组类型的参数(如ArrayList) Oracle 存储过程 及 .net 调用 按钮事件 直接下载 任何文件格式 ASP.NET MVC beta 中文模板修正补丁 IE7\IE6 图片上传预览 - 景天 - 博客园
Oracle10g常用命令 和 常用函数
景天 · 2008-11-08 · via 博客园 - 景天

select view_name from user_views 查看用户视图列表

select view_name from dba_views 系统视图列表

Desc User_views 查看视图的信息结构

Desc User_tables 查看表的信息结构

DESC user_synonyms

DESC Dba_synonyms //查看同义词字段

select user from dual 当前登陆用户名

用法:LENGTH(str)

用法:LENGTHB(str)

Ltrim

去掉左边空格

Rtrim

去掉右边空格

Trim

去掉左右两边空格

Eg:

Select Length(Ltrim(' abc ')) from dual;

4

用法: SUBSTR(str,startCount,Length)

str:待取字符串

startCount:开始数,从1开始。

Count要取的长度

Replace(oldStr,newStr)

SELECT SYSDATE FROM dual

ALERT SESSION SET NLS_DATE_FORMAT='dd-mon-yyyy hh:mi:si';

//改变当前时间的格式

NEXT_DAY

SELECT NEXT_DAY(SYSDATE,'星期一') FROM dual

//选择下个星期一的日期。

用法 TO_CHAR(要转换内容,格式)

Eg:

Select TO_CHAR(sysdate,'yyyy-mm-dd') FROM dual;

2008-11-8

SELECT TO_CHAR(SYSDATE,'yyyy-mm-dd hh24:mi:ss') FROM dual;

2008-11-8 23:15:00

SELECT TO_DATE('12-3-08') FROM dual

SELECT TO_NUMBER('0008') FROM dual

8

聚合函数

MAX

最大值

MIN

最小

SUM

AVG

平均

COUNT

个数//注意

COUNT(*) 不一定等于 COUNT(column)