关于Oracle的create

create 的语法:

1. 此时是利用table_name2表的全部字段创建的table_name1;

create table  table_name1 (select * from table_name2);

2. 如果要选取几个字段就要用到AS;

create table table_name1 as select id,name from table_name2 (where .... order by ....);

好的解散!

原文地址:https://www.cnblogs.com/shanpei/p/12157845.html

时间: 2024-10-16 13:05:51

关于Oracle的create的相关文章

【转】oracle 创建create user 详解

oracle 创建create user 及授权grant 查看登陆的用户: 以下都可以: show   user; select   sys_context('userenv','session_user')   from   dual; select   user   from   dual; 查看所有登录的用户必须为DBA 用户: select   username   from   v$session; sys.system等DBA 用户查看 其他用户(test)中的对象(表): SQL

sql: Oracle 11g create procedure

CREATE OR REPLACE PROCEDURE proc_Insert_BookKindList ( temTypeName nvarchar2, temParent int ) AS ncount number; begin --SELECT COUNT (*) INTO ncount FROM BookKindList fm1 where EXISTS (SELECT BookKindName from BookKindList fm2 where fm2.BookKindName=

Oracle Demo ->> CREATE TABLE

CREATE TABLE employees_demo ( employee_id NUMBER(6) , first_name VARCHAR2(20) , last_name VARCHAR2(25) CONSTRAINT emp_last_name_nn_demo NOT NULL , email VARCHAR2(25) CONSTRAINT emp_email_nn_demo NOT NULL , phone_number VARCHAR2(20) , hire_date DATE D

Oracle视图 create View

视图是一种虚表,使用CREATE VIEW语句来定义视图,该视图是基于一个或多个表或视图的逻辑表.一个视图本身不包含任何数据, 视图所基于的表称为基表. 视图就相当于一条select 语句,定义了一个视图就是定义了一个sql语句, 视图不占空间,使用视图不会提高性能,但是能简化sql语句 . 创建视图: create view 视图名; 如: create or replace view  v_test  as select * from test where age=10; create or

oracle 创建create user 及授权grant 查看登陆的用户

show user; select sys_context('userenv','session_user') from dual; select user from dual; 查看所有登录的用户必须为DBA 用户: select username from v$session; sys.system等DBA 用户查看 其他用户(test)中的对象(表): SQL> select * from test.student; 创建一个普通用户都把该用户用起来的流程: 1.创建用户 SQL>cre

sql: Oracle 11g create table, function,trigger, sequence

--书藉位置Place目录 drop table BookPlaceList; create table BookPlaceList ( BookPlaceID INT PRIMARY KEY, --NUMBER BookPlaceName nvarchar2(500) not null, BookPlaceCode varchar(100) null, --位置編碼 BookPlaceParent INT null --BookPlaceKindId nvarchar(500) null --

oracle语法记录

-- loop的三种形式 (1).LOOP (2).WHILE ... LOOOP (3).FOR ... LOOP 1.基本的LOOP语句 SET serveroutput ON; -- exit ... when 结束循环 DECLARE v_value NUMBER(8) := -3; BEGIN <<value_loop>> -- 循环标记 LOOP dbms_output.put_line('v_value = ' || v_value); v_value := v_va

oracle (DBaaS) 服务介绍

转 https://oracle-base.com/articles/vm/oracle-cloud-database-as-a-service-dbaas-create-service?utm_source=tuicool&utm_medium=referral Oracle Cloud : Database as a Service (DBaaS) - Create Service This article provides a run through of creating a new D

How to Log Users Login and Logout Details Through Oracle Forms

Log user's login and logout details in to table through Oracle Forms using POST-LOGON and PRE-LOGOUT triggers to track the user's login and logout activity for auditing purposes. In this example one table and a sequence object is used to log the data