吉佳 发表于 2018-9-9 10:18:21

oracle基本操作

  对表的结构操作
  add                              增
  alter    table   表名      drop          (列 字符类型(长度));    删
  modify                            改
  desc   dept;    查表结构
  对记录操作
  select列名   from    表名    where    条件   查
  updatestudent set   列=“”    where    条件   改
  deletefrom   表名    where   条件   删(只删记录不删表结构)
  max()       最大值
  函数         min()       最小值
  avg()       平均值
  count()      总 值
  关联数据库查询
  select列名,列名   from   表1,表2   where主键=外键and条件
  select列名,列名   from   表1   where 表1主键=(select表2外键from
  表2   where 条件)
  like   字符%   以什么开头
  orderby   排序
  groupby   列名having条件   按什么分组统计在用having限制条件

页: [1]
查看完整版本: oracle基本操作