当前位置:网站首页>oracle 查询语句总结
oracle 查询语句总结
2022-07-19 05:20:00 【ima_zhan】
// 查询某字段为某个值的记录
select * from sales where type = '皮夹子'
// 模糊查询
select * from sys_users where name like '%吴%'
// 去重查询
select distinct type_name, table_name from menuTab;
// 查询前10条
select * caseTab where rownum < 10;
// 统计某一字段不同数值数量
select count(distinct(caseType)) from caseTab;
// 统计某个字段不同数值的各自数量
select caseType, count(1) from caseTab group by caseType;
// 左join
select * from caseTab a left join caseTypeTab b on a.id = b.id where caseDt between to_date('2020-07-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2020-07-31 00:00:00','yyyy-mm-dd hh24:mi:ss')
// 右join
// 与左join类似,不同在于左join保留左侧表的所有记录,即使没有匹配on中条件的项 ***注意,此处条件指的是on后面的 // 而右join保留右侧的表的记录
边栏推荐
- 抽象类和接口的区别
- 重载和重写的区别
- Scala案例(伴生对象)
- ModuleNotFoundError: No module named 'cv2'
- 如何将一台局域网内的无公网IP的电脑,变成公网可访问的服务器(ssh访问为例)
- fio测试硬盘性能
- Statistical experiment data naming, data naming rules like:d8i8 txt
- Openstack hot migration error: exception during message handling invalidcpuinfo unacceptable CPU info CPU do
- 静态路由复习
- 在磁盘阵列(RAID)上搭建LVM
猜你喜欢
随机推荐
ceph-deploy配置ceph分布式集群
黑马程序员方式一实现多线程
ModuleNotFoundError: No module named 'cv2'
Regular Expression
Mikrotik ROS软路由设置上网方式(三)
网络安全与等级保护
Nju Nanjing University elevation course: battlecity
栈模拟队列
Configuring multiple servers with ZABBIX agent
静态路由复习
Server hardware and RAID configuration and Practice
【report】tf-faster-rcnn 运行自己的训练数据 could not broadcast input array from shape (4) into shape (0)
[resource record] Introduction to Bayesian neural network (BNN), common packages and differences
磁盘以及文件系统
服务器硬件及RAID配置与实战
Build LVM on disk array (RAID)
Network Security Learning (XXII) build virtual special lines for companies and branches
“重写”和“重载”的区别
手动编译安装apache
Variational Inference 笔记 from UCB CS 285 Sergey Levine