oracle基本操作
2015-08-07 09:56
447 查看
对表的结构操作
add 增
alter table 表名 drop (列 字符类型(长度)); 删
modify 改
desc dept; 查表结构
对记录操作
select 列名 from 表名 where 条件 查
update student set 列=“” where 条件 改
delete from 表名 where 条件 删(只删记录不删表结构)
max() 最大值
函数 min() 最小值
avg() 平均值
count() 总 值
关联数据库查询
select 列名,列名 from 表1,表2 where 主键=外键 and 条件
select 列名,列名 from 表1 where 表1主键=(select 表2外键 from
表2 where 条件)
like 字符% 以什么开头
order by 排序
group by 列名 having 条件 按什么分组统计在用having限制条件
add 增
alter table 表名 drop (列 字符类型(长度)); 删
modify 改
desc dept; 查表结构
对记录操作
select 列名 from 表名 where 条件 查
update student set 列=“” where 条件 改
delete from 表名 where 条件 删(只删记录不删表结构)
max() 最大值
函数 min() 最小值
avg() 平均值
count() 总 值
关联数据库查询
select 列名,列名 from 表1,表2 where 主键=外键 and 条件
select 列名,列名 from 表1 where 表1主键=(select 表2外键 from
表2 where 条件)
like 字符% 以什么开头
order by 排序
group by 列名 having 条件 按什么分组统计在用having限制条件
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析
- Oracle 函数大全[字符串函数,数学函数,日期函数]第1/4页
- ORACLE LATERAL-SQL-INJECTION 个人见解