当前位置:Gxlcms > 数据库问题 > pl/sql客户端命令

pl/sql客户端命令

时间:2021-07-01 10:21:17 帮助过:24人阅读

查看表:select * from 表名;
查看字符集:select userenv(‘langu字段名‘) from dual;
查看全部字符集:select * from nls_database_parameters;
--去除重复
select distinct 字段名 from 表名
--分组筛选
select * from 表名 t group by t.phone
having count(*)>1;
--求空值
select * from 表名 where 字段名 is null;
--更新数据
update 表名 set 字段名=39 where 字段名 is null and 字段名>110;
select * from 表名 where 字段名>110;
--求平均值
select avg(字段名) from 表名;
--求最大值和最小值
select max(字段名),min(字段名) from 表名;
--求标准差
select 字段名,round((字段名-18)/(60-18),2) 字段名_stand from 表名;
--取前一万条数据
select * from 表名 where rownum <=10000;

pl/sql客户端命令

标签:where   and   筛选   tab   sele   客户端命令   均值   客户   表名   

人气教程排行