![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
伯牙BOYA不复鼓
这个作者很懒,什么都没留下…
展开
-
oracle数据管理--(用户管理)
1.用户解锁与加锁:alter user 用户名 account lock/unlock; 2.查询其它用户的表:select *from 用户.表名; 3.连接数据库:conn sys/123@orcl as sysdba; 4.查看当前是哪个用户登录的:show user; 5.使用system用户为scott增加权限:grant create view,create table to...原创 2019-04-13 19:18:42 · 123 阅读 · 0 评论 -
sql语句用法--实验用数据表及添加注释
1.实验用数据表 ①Select * from tab; 查询当前用户下的所有表,tab为系统表名。 ②select *from user_tables;详细地查询当前用户下的所有表,user_tables为表名。 ③desc 表名;查看表结构 2.添加注释 (1)为表添加注释:comment on table emp is ’雇员表’; (2)为列添加注释:comment on column e...原创 2019-04-13 19:25:22 · 251 阅读 · 0 评论 -
数据库sql语句函数的用法
sql函数(单行函数:处理单行数据;组函数:处理多行数据) 1.字符函数 ①concat(string1,string2)拼接两个字符串 ②initcap (string) string的每个单词首字母大写 ③Lower(string) 以小写形式返回string ④lpad(string1,index,string2) 在string1左边填充string2到第index位置 ⑤rpad(str...原创 2019-04-13 19:30:46 · 648 阅读 · 0 评论 -
数据库--多表查询
1.92语法 ①语法规则: SELECT table1.column, table2.column FROM table1, table2 WHERE table1.column1 = table2.column2; 在where子句中写入连接条件 当多个表中有重名列是,必须在列的名字前加上表名作为前缀 ②连接的类型: 等值连接 --> = 取关系列相同的记录 非等...原创 2019-04-14 21:47:10 · 148 阅读 · 0 评论