当前位置:Gxlcms > 数据库问题 > oracle基本操作

oracle基本操作

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

对表的结构操作

                        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限制条件   


本文出自 “创新分享驰骋里外” 博客,请务必保留此出处http://10554846.blog.51cto.com/10544846/1682514

oracle基本操作

标签:oracle

人气教程排行