Table structure in Oracle using a copy into another table - developed technology

2011-01-20  来源:本站原创  分类:Database  人气:75 

Q: How in Oracle using a copy of the table structure into another table?

A: The specific solution steps are as follows:

1, the structure of a table and copy all the data into a new table:

create table components2 as select * from components

2, just copy the structure of another table without copying the data:

create table components2 as select * from components where id <1000;

Note: components table id minimum value is 1000, so there is less than the minimum if the row selected, then that is the table structure.

相关文章
  • Table structure in Oracle using a copy into another table - developed technology 2011-01-20

    Q: How in Oracle using a copy of the table structure into another table? A: The specific solution steps are as follows: 1, the structure of a table and copy all the data into a new table: create table components2 as select * from components 2, just c

  • The table structure and data replication to another within a table. 2010-05-13

    The table structure and data replication to another within a table. create table tel_sys_bureau_bak_2 as select * from tel_sys_bureau

  • How to copy the table structure in Oracle data and table 2011-07-29

    1 copy table structure and data: create table table_name_new as select * from table_name_old 2 copy only the table structure: create table table_name_new as select * from table_name_old where 1 = 2; Or: create table table_name_new like table_name_old

  • postgresql-see table structure (sql commands and methods). to modify the table structure. foreign key 2010-02-06

    SQL mode view table structure (table name is a student) mydb = # SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen AS length, a . Atttypmod AS lengthvar, a.attnotnull AS notnull mydb-# FROM pg_class c, pg_attribute a, pg_type t mydb-#

  • How to copy in Oracle and SQLServer table structure and table data 2011-09-19

    How to copy the table structure in Oracle data and table 1 copy table structure and data: Oracle: create table emp2 as select * from emp; SQLServer: SELECT * INTO t FROM t_score; 2 copy only the table structure: Oracle: create table emp2 as select *

  • MySQL copy table structure and data of SQL statements 2010-12-22

    1 copy table structure and data to the new table Quote CREATE TABLE new_table SELECT * FROM old_table 2 copy only the table structure to new table Quote CREATE TABLE new_table SELECT * FROM old_table WHERE 1 = 2 Note: The WHERE condition does not hol

  • MySQL copy table structure and data in SQL statements 2011-05-11

    1 copy table structure and data to the new table New table CREATE TABLE SELECT * FROM old table 2 copy only the table structure to new table New table CREATE TABLE SELECT * FROM table WHERE 1 = 2 old Namely: Let WHERE condition does not hold. New tab

  • With pl / sql developer export table structure and data 2011-03-16

    Were previously accustomed to using imp / exp command to import / export oracle data With pl / sql developer interface of the operation is also very convenient: 1 Click Tools - Export User Objects This way you can export the current user owns all obj

  • In SqlServer 2008 Management Studio directly modify table data and table structure 2011-03-17

    Are used to SqlServer 2000, SqlServer 2008 Management Studio and then directly modify the table data will be very used to, because in 2008 only to modify the default the first 200 data. How can display and modify more data? In Management Studio, open

  • mysql modify table structure 2011-03-18

    mysql modify table structure 1 to add a field (a) alter table table_name add column column_name type default value; type refers to the type of the field, value refers to the field's default value For example: alter table mybook add column publish_hou

  • [Copy] Mysql Merge table 2011-07-08

    In Mysql database, Mysql Merge table somewhat similar view. Let's take a look Mysql Merge table with what are the advantages, I hope you can help. Mysql Merge table of advantages: A: separation of static and dynamic data B: the use of the structure c

  • oracle copy table data, copy the table structure 2011-07-25

    1 different users copy data between tables in a database for the two users A and B, if A table need to copy the old data to B under the new, adequate user permissions please login sqlplus: insert into B.new (select * from A.old); If you need addition

  • Oracle Copy table structure and table data 2010-03-05

    1. Copy table structure and data: create table table_name_new as select * from table_name_old 2. Just copy the table structure: create table table_name_new as select * from table_name_old where 1=2; or: create table table_name_new like table_name_old

  • How to copy the Oracle table structure and table data 2010-12-22

    1. Copy a table structure and data : create table table_name_new as select * from table_name_old 2. Only the table structure : create table table_name_new as select * from table_name_old where 1=2; Or : create table table_name_new like table_name_old

  • oracle / sql server/DB2/mysql/postgreSQL table structure and data back up 2011-08-03

    1 copy table structure and data in the table oracle / mysql / PostgreSQL: create table SBI_T_PCV_CHASSISPRICE_BACKUP as select t.c_id, t.var_id, t.id, t.c_price from SBI_T_PCV_CHASSISPRICE t; If you do not need the table structure, table data only, c

  • Copy table structure SQL statement 2011-06-14

    1. I want to create a new table table1, and structure of the table with ts_account This exactly the same as in the table, how to write SQL SQL Statement : SQL SERVER: select * into ele_payee_account_rr from ele_payee_account where 1=2 ORACLE & MYSQL:

  • Export oracle database table structure to the word 2011-08-16

    Due to the work requirements, write software, operating documentation, but after the software production process in the continuously changing, and some of the original design document form table structure with the current structure with greater acces

  • [Sql server] Copy table structure to a specified table 2010-04-10

    Reprinted from http://anna-zr.javaeye.com/blog/466495 Keywords: database, how to copy the structure of other tables to a specified table to, such as the following example: There are three tables: Table A: Field 1, Field 2, Field 3 Table B: Field 1, F

  • sql copy tables and table structure 2010-04-12

    Review the time to see the contents of the sql: 1. Copy Table (1) create a new table, copy the table structure and copy the contents of the table create tablenew select * from tableold (2) Create a new table, copy the table structure but does not cop

  • sql statement to copy the table structure and data 2010-04-13

    I was under the same user to backup data in a table First, create the table structure create table transation_his_bak as select * from adjust_power_transaction_his where 1=2 Next, copy the data table insert into transation_his_bak select * from adjus