Oracle常用plsql】的更多相关文章

String aggr http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php     SELECT 'SELECT ' || COLUMNLISTS ||' FROM ' || TBL.TABLE_NAME || ';'AS SELECTSQL, 'SELECT COUNT(*) AS CNT FROM ' || TBL.TABLE_NAME || ';' COUNTSQL FROM user_tab…
Oracle常用语句语法汇总 Oracle10g 1 第一章Oracle命令 a) 系统管理员连接 conn */* as sysdba b) 查询当前用户 show user c) 创建新用户 create user 用户名 identified by 密码(密码不能以数字开头).例如create user abc identified by cba d) 用户登录 conn 用户名/密码.例如conn abc/cba e) 用户授权 grant 权限 to 用户.例如grant connec…
oracle教程:PLSQL常用方法汇总 在SQLPLUS下,实现中-英字符集转换alter session set nls_language='AMERICAN';alter session set nls_language='SIMPLIFIED CHINESE'; 主要知识点:一.有关表的操作1)建表 create table test as select * from dept; --从已知表复制数据和结构create table test as select * from dept w…
这篇博客主要是Oracle常用基础语法, 另外,存储过程和存储函数很重要,这个后期看视频学习,还有DB优化,另外,还有plsql develop和navicat的使用,重点是数据的导入导出: ----------------------------------------------------------------------------------------------------------------------------------------------------------…
一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>startup SVRMGR>quit b.关闭ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>shutdown SVRMGR>quit 启动…
前一段时间学习Oracle 时做的学习笔记,整理了一下,下面是分享的Oracle常用函数的部分笔记,以后还会分享其他部分的笔记,请大家批评指正. 1.Oracle 数据库中的to_date()函数的使用: 往emp表中插入一条记录: SQL,,,); ,,,) ORA: 文字与格式字符串不匹配--日期格式不对 使用to_date()函数搞定:格式to_date('1965-02-05','yyyy-mm-dd'); 2.Oracle中的字符函数: 字符函数是Oracle中最常用的函数, lowe…
三.查看数据库的SQL 1 .查看表空间的名称及大小 select  t.tablespace_name,  round ( sum (bytes / ( 1024 * 1024 )), 0 ) ts_size from  dba_tablespaces t, dba_data_files d where  t.tablespace_name  =  d.tablespace_name group   by  t.tablespace_name; 2 .查看表空间物理文件的名称及大小 selec…
oracle常用经典SQL查询 常用SQL查询: .查看表空间的名称及大小 )),) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespace_name; .查看表空间物理文件的名称及大小 select tablespace_name, file_id, file_name, ),) total_space from dba_…
一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle  a.启动ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>startup SVRMGR>quit  b.关闭ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>shutdown SVRMGR>quit …
一.ORACLE的启动和关闭1.在单机环境下要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下su - oraclea.启动ORACLE系统oracle>svrmgrlSVRMGR>connect internalSVRMGR>startupSVRMGR>quitb.关闭ORACLE系统oracle>svrmgrlSVRMGR>connect internalSVRMGR>shutdownSVRMGR>quit启动oracle9i数据库命令:…