首页 > 代码库 > 创建表及对表的增删改查基本操作
创建表及对表的增删改查基本操作
查看数据库的名称:
SQL>show parameter db_name
查询scott用户的状态:
SQL>select username,account_stutas from dba_users where username=‘SCOTT‘;
解锁scott用户:alter user 解锁用户名 account unlock;
SQL>alter user scott account unlock;
查询用户拥有那些表:
SQL>select user_name from user_tables;
设置查询数据的时间格式:
SQL>alter session set nls_date_format=‘YYYY-MM-DD‘;
ROUND(X,Y):四舍五入函数。
sysdate:当前时间。
nvl(x,y):如果x有值则返回x,如果x为空,则返回y。
select 字段名 from 表名称 for update; ----for update:表示可以修改数据了。
创建表及对表的增删改查基本操作
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。