Create New Table by Selecting Data from Other Tables with CREATE TABLE AS Ustvarjanje nove tabele z izbiro podatkov iz drugih tabel s CREATE TABLE AS

By using SQL data manipulation statement, a new, temporary, backup or regular table can be created and filled or inserted with data from another table or tables retrieved by SELECT statement. Z uporabo SQL podatkov manipulacije izjavo, novo, začasno, backup ali redne preglednice lahko ustvarite in zasedena ali vstavi podatke iz druge tabele ali tabel, ki jih Vzpostavljeno SELECT izjavo. The SQL data manipulation language is CREATE TABLE AS which can be used to create a new table built from contents of result set by a query on a table that already exists within the database. SQL jezik za manipulacijo podatkov je CREATE TABLE AS, ki se lahko uporabijo za ustvarjanje nove tabele zgrajene iz vsebine rezultat, ki ga je določil poizvedbo v tabeli, ki že obstaja v bazi podatkov. Both the column types, and row data for the new table, come from the SELECT command specified by select. Oba stolpca vrste in vrstica podatkov za nove tabele, prihajajo iz SELECT ukaz, ki ga izberete.

CREATE TABLE AS has the following syntax or synopsis in simple form: CREATE TABLE AS je naslednji sintaksi ali sinopsis v preprosti obliki:

CREATE TABLE new_table_name [ ( column [, ...] ) ] AS SELECT [ ( column [, ...] ) ] FROM existing table_name CREATE TABLE new_table_name [(stolpec [, ...])] AS SELECT [(stolpec [, ...])] iz obstoječih table_name

The SELECT statement can be in a complex form where data is been retrieved from several tables. V SELECT izjavo lahko v kompleksne oblike, kjer so bili podatki pridobljeni iz več tabel. For the new table, column names can be specified by including the column names in a comma-delimited list. Za nova tabela, stolpec imena se lahko določi tudi stolpec imen v comma-razmejenega seznam. Very important point to take note is that there should be the same number of columns specified in the column list preceding the AS clause (optional, if specified) for new table as the number of target columns that are returned by the select statement. Zelo pomembna točka, da upoštevajo, da mora biti isto število stolpcev je določeno v stolpcu seznam pred AS klavzula (neobvezno, če je določeno) za nove tabele, kot je število ciljnih stolpcev, ki so jih vrne izberite izjavo. If the optional list of columns in parentheses of new table contains different number of rows than the rows the SELECT statement returns, the following error message will be displayed: Če je neobvezna seznam stolpcev v oklepaju za nova tabela vsebuje različno število vrstic od vrstice v SELECT izjavo vrne, se prikaže sporočilo o napaki se prikaže:

ERROR: CREATE TABLE/AS SELECT has mismatched column count NAPAKA: CREATE TABLE / AS SELECT je neusklajeno stolpcu count

In its simplest form, CREATE TABLE AS statement will create a complete backup of an existing table including all columns and data simply by using the statement CREATE TABLE new_table_name AS SELECT * FROM existing_table_name . V svoji najenostavnejši obliki, CREATE TABLE AS izjava bo ustvaril popolno varnostno kopijo obstoječega tabela vključuje vse stolpce in podatke preprosto z izjavo CREATE TABLE new_table_name AS SELECT * FROM existing_table_name.

IMPORTANT : The page is machine translated and provided "as is" without warranty. POMEMBNO: Ta stran je stroj prevod in če "kot je" brez garancije. Machine translation may be difficult to understand. Strojno prevajanje je lahko težko razumeti. Please refer to Prosimo, da original English article original English članek whenever possible. kadar je to mogoče.


3 Responses to “Create New Table by Selecting Data from Other Tables with CREATE TABLE AS” 3 odzivi na "Ustvari novo preglednico s Izbiranje podatkov iz drugih tabel s CREATE TABLE AS"

  1. Dinesh Dinesh
    January 28th, 2009 17:46 28. januar 2009 17:46
    3 3

    CREATE TABLE new_table_name [ ( column [, ...] ) ] AS SELECT [ ( column [, ...] ) ] FROM existing table_name CREATE TABLE new_table_name [(stolpec [, ...])] AS SELECT [(stolpec [, ...])] iz obstoječih table_name

    this query possible in MS-ACCESS or not to vprašanje je mogoče, v MS-ACCESS ali ne

  2. tariq Tariq
    January 10th, 2008 13:31 10. januar 2008 13:31
    2 2

    Data in the table that is created using create table as select” is different from the data that is returned when the same select that creates the table is executed separately???? Podatki v tabeli, ki je proizvedena s pomočjo ustvarite preglednico izberite "se razlikujejo od podatkov, ki se vrne, kadar isti izberite ki ustvarja tabele se izvrši ločeno??
    WE are using the tool PL/SQL Developer . WE uporabljate orodje PL / SQL Developer.
    Any idea what this problem is due to? Kakšna ideja, kaj je ta problem posledica?

  3. ikarus ikarus
    April 1st, 2007 03:26 1. april 2007 03:26
    1 1

    We can do it also with the query, Mi lahko to storite tudi s poizvedbo,

    SELECT * INTO newtable FROM existingtable SELECT * INTO newtable IZ existingtable

    I think its a little bit shorter. Mislim, da njeno malo krajše.

Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Lahko uporabite te oznake: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Naročite se na komentarje funkcija je bila onemogočena. To receive notification of latest comments posted, subscribe to Če želite prejemati obvestila o najnovejših pripombe napoten, se naročite na My Digital Life Comments RSS feed Moje digitalno življenje Comments RSS or ali register to receive Registrirajte se za prejemanje new comments in daily email digest. novi komentarji v dnevni email prebavljajo.
Custom Search

New Articles Novi členi

Incoming Search Terms for the Article Dohodna Iskalni pogoji za člen

create table as select ustvariti preglednico izberite - -- create table select ustvari tabele izberite - -- create table as select from ustvariti preglednico izberite - -- create table with select ustvariti tabelo z izbranimi - -- create table from select ustvariti tabelo iz izberite - -- db2 create table as select DB2 ustvarite preglednico izberite - -- create table from select statement ustvari tabele izberite iz izkaza - -- create table select from ustvari tabele izberite - -- db2 create table from select DB2 ustvariti tabelo iz izberite - -- create new table ustvariti novo tabelo - -- access create table dostop ustvariti tabelo - -- create table as select DB2 ustvariti preglednico izberite DB2 - -- select create table izberite ustvarjanje tabele - -- db2 create table select DB2 ustvari tabele izberite - -- create table as select ustvariti preglednico izberite - -- CREATE TABLE USING SELECT STATEMENT CREATE TABLE USING SELECT STATEMENT - -- create table with data ustvariti tabelo s podatki - -- db2 create table as DB2 ustvariti tabelo kot - -- oracle select into new table Proroštvo izberite v novi tabeli - -- all vse - -- create table select into ustvari tabele izberite v - -- create table select ustvari tabele izberite - -- create a data table ustvarite podatkovno tabelo - -- create table into ustvariti tabelo v - -- MS Access Create table as select MS Access Ustvari tabelo kot izberite - -- create table as select in db2 ustvariti preglednico izberite v DB2 - -- access create table as select dostop ustvarite preglednico izberite - -- create table as select ms access ustvariti preglednico izberete MS Access - -- MS ACCESS CREATE TABLE SELECT MS Access CREATE TABLE SELECT - -- sqlite create table as select sqlite ustvarite preglednico izberite - -- create table select db2 ustvari tabele izberite DB2 - -- access create table select dostop ustvari tabele izberite - -- db2 create table from another table DB2 ustvariti tabelo iz druge tabele - -- sql create table from select statement sql ustvariti tabelo iz izberite izjavo - -- Creating tables thru union query in MS access + select into Ustvarjanje tabel s strani Unije poizvedba v MS Access + izberite v - -- oracle create table as select Proroštvo ustvarite preglednico izberite - -- create table access ustvariti tabelo dostop - -- create table+select ustvariti tabelo + izberite - -- how to create a data table kako ustvariti podatkovno tabelo - -- create table using select ustvariti tabelo izberete z uporabo - -- CREATE TABLE SELECT ACCESS CREATE TABLE SELECT DOSTOP - -- create table with data from another table ustvariti tabelo s podatki iz druge tabele - -- create table select as ustvariti tabelo izberete, kot - -- create table from existing table in Db2 ustvari tabele iz obstoječe tabele v DB2 - -- create table as select access ustvariti preglednico izberite dostopno - -- SQL Insert table data via select statement SQL Insert tabele izberite podatke prek izkaza - -- access create table from select dostop ustvariti tabelo iz izberite - -- oracle create backup table Proroštvo ustvarite varnostno kopijo tabele - -- db2 create table as select from DB2 ustvarite preglednico izberite - -- db2 create table as select * from DB2 ustvarite preglednico izberite * iz - -- create table (select ustvariti tabelo (izberite - -- select into new table oracle izberite v novi tabeli Proroštvo - -- create table from another table in db2 ustvariti tabelo iz druge tabele v DB2 - -- create table using select db2 ustvariti tabelo izberete z uporabo DB2 - -- access create table as dostop ustvariti tabelo kot - -- oracle create table backup Proroštvo ustvariti tabelo rezervno - -- create table as (select ustvariti preglednico (izberite - -- create backup table sql ustvarite varnostno kopijo tabele sql - -- create table from select ustvariti tabelo iz izberite - -- create table from select statement oracle ustvariti tabelo iz izberite izjavo Proroštvo - -- create table with select ustvariti tabelo z izbranimi - -- ms access create table from select MS Access ustvari tabelo iz izberite - -- db2 create table as DB2 ustvariti tabelo kot - -- oracle create table select Proroštvo ustvari tabele izberite - -- microsoft access create table as select Microsoft Access ustvari tabelo kot izberite - -- create table another table db2 ustvariti tabelo drugo tabelo DB2 - -- CREATE TABLE INTO SELECT CREATE TABLE V SELECT - -- make a data table online dati podatke preglednice na spletu - -- create data table ustvariti podatkov tabele - -- CREATE TABLE AS SELECT ORACLE CREATE TABLE AS SELECT Oracle - -- create table + select ustvariti tabelo + izberite - -- create a backup table in SQL ustvarite varnostno kopijo tabele v SQL - -- create a table from select statement ustvariti tabelo iz izberite izjavo - -- create table from other table ustvariti tabelo iz druge tabele - -- create backup table in sql ustvarite varnostno kopijo tabele v sql - --