Oracle Live SQL

提供: Amayus Wiki
Jump to navigation Jump to search

https://livesql.oracle.com/

バージョン[編集]

SELECT * FROM v$version;

確認日: 2017/03/30[編集]

BANNER
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE 12.2.0.1.0 Production
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production

確認日: 2018/12/12[編集]

BANNER BANNER_FULL BANNER_LEGACY CON_ID
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production 0

権限[編集]

SELECT PRIVILEGE, ADMIN_OPTION FROM user_sys_privs ORDER BY 1;
PRIVILEGE ADMIN_OPTION
CREATE ANALYTIC VIEW NO
CREATE ATTRIBUTE DIMENSION NO
CREATE CLUSTER NO
CREATE DIMENSION NO
CREATE HIERARCHY NO
CREATE INDEXTYPE NO
CREATE MATERIALIZED VIEW NO
CREATE MINING MODEL NO
CREATE OPERATOR NO
CREATE PROCEDURE NO
CREATE SEQUENCE NO
CREATE SYNONYM NO
CREATE TABLE NO
CREATE TRIGGER NO
CREATE TYPE NO
CREATE VIEW NO
SELECT owner, table_name, privilege, grantable FROM user_tab_privs;
OWNER TABLE_NAME PRIVILEGE GRANTABLE
LIVESQL ORACLE_SQL_USER_V$SQL READ NO
LIVESQL ORACLE_SQL_USER_V$SQL_PLAN READ NO
LIVESQL ORACLE_SQL_USER_V$SQLSTATS READ NO
LIVESQL ORACLE_SQL_USER_V$SESSION READ NO
LIVESQL ORACLE_SQL_USER_V$SQL_PLAN_S_A READ NO
SYS SQL_xxxxxxxxxxxxxxxxxxxxxxxxx INHERIT PRIVILEGES NO
SELECT * FROM user_role_privs;
no data found
SELECT synonym_name, table_owner, table_name FROM user_synonyms;
SYNONYM_NAME TABLE_OWNER TABLE_NAME
V$SESSION LIVESQL ORACLE_SQL_USER_V$SESSION
V$SQL LIVESQL ORACLE_SQL_USER_V$SQL
V$SQLSTATS LIVESQL ORACLE_SQL_USER_V$SQLSTATS
V$SQL_PLAN LIVESQL ORACLE_SQL_USER_V$SQL_PLAN
V$SQL_PLAN_STATISTICS_ALL LIVESQL ORACLE_SQL_USER_V$SQL_PLAN_S_A

サンプルデータ[編集]

SELECT table_name, num_rows FROM all_tables WHERE owner = 'HR' ORDER BY 1;
TABLE_NAME NUM_ROWS
COUNTRIES 25
DEPARTMENTS 27
EMPLOYEES 107
JOBS 19
JOB_HISTORY 10
LOCATIONS 23
REGIONS 4
SELECT table_name, num_rows FROM all_tables WHERE owner = 'SH' ORDER BY 1;
TABLE_NAME NUM_ROWS
CAL_MONTH_SALES_MV 48
CHANNELS 5
COSTS 82112
COUNTRIES 23
CUSTOMERS 55500
DIMENSION_EXCEPTIONS 0
FWEEK_PSCAT_SALES_MV 11266
PRODUCTS 72
PROMOTIONS 503
SALES 918843
SELECT table_name, num_rows FROM all_tables WHERE owner = 'SCOTT' ORDER BY 1;
TABLE_NAME NUM_ROWS
DEPT 4
EMP 14
SELECT table_name, num_rows FROM all_tables WHERE owner = 'AV' ORDER BY 1;
TABLE_NAME NUM_ROWS
GEOGRAPHY_DIM 181
PRODUCT_DIM 8
SALES_FACT 86880
TIME_DIM 60
SELECT table_name, num_rows FROM all_tables WHERE owner = 'DD' ORDER BY 1;
TABLE_NAME NUM_ROWS
DD_DEQUEUE_ERRORS 0
DD_DINOSAURS 8
DD_LOCATIONS 20
DD_MEMBERS 5041
DD_MESSAGES 40
DD_SEED_DATA 500
DD_SETTINGS 1
DD_TEMPLATES 0
SELECT table_name, num_rows FROM all_tables WHERE owner = 'WORLD';
TABLE_NAME NUM_ROWS
WORLD_POPULATION 215