Create New Table by Selecting Data from Other Tables with CREATE TABLE AS Stvaranje nove tablice odabirom podataka iz drugih stolova s stvoriti tablice što

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. Korištenjem SQL podaci rukovanje izjava, novu, privremenu, rezervni ili redovne stol može biti izrađen i popunjen ili umetnuta s podacima iz druge tablice ili tablice SELECT Dobavljeno po izjavi. 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 upravljanje podatcima je STVORITI KAO STO koje možete koristiti da biste stvorili novu tablicu sa građen sadržaj rezultat postavila upit na stolu koji već postoji u bazi podataka. Both the column types, and row data for the new table, come from the SELECT command specified by select. Obje vrste kolone, i red podataka za nove tablice, dolaze iz SELECT naredbu određuje odabir.

CREATE TABLE AS has the following syntax or synopsis in simple form: KAKO STVORITI STOL ima sljedeću sintaksu ili sinopsis na jednostavan oblik:

CREATE TABLE new_table_name [ ( column [, ...] ) ] AS SELECT [ ( column [, ...] ) ] FROM existing table_name STVORITI STOL new_table_name [(stupac [, ...])] AS SELECT [(stupac [, ...])] iz postojećih table_name

The SELECT statement can be in a complex form where data is been retrieved from several tables. U izjavi SELECT može biti u obliku kompleksnih podataka gdje je bio Dobavljeno iz nekoliko tablica. For the new table, column names can be specified by including the column names in a comma-delimited list. Za novi stol, kolona može biti navedena imena uključujući kolone imena razdvojena zarezom-listi. 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. Vrlo važna točka uzeti na znanje da je tamo bi trebao biti isti broj stupaca navedene u stupcu popis prethodi KAO stavak (opcionalno, ako je naveden) za nove tablice kao što je broj stupaca koji su ciljani vraćen od strane odaberite izjavu. 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: Ako izborno popis stupaca u zagradama novih tablica sadrži različiti broj redova od reda "Select izjava vraća, sljedeću poruku o pogrešci će biti prikazan:

ERROR: CREATE TABLE/AS SELECT has mismatched column count ERROR: STVORITI STOL / AS SELECT je neprilagođeno stupac računati

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 . U svom najjednostavniji oblik, napravite tablicu kao iskaz će stvoriti potpunu sigurnosnu kopiju postojeće tablice, uključujući sve stupce i podatke jednostavno pomoću izjava STVORITI STOL new_table_name AS SELECT * FROM existing_table_name.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. VAŽNO: Ovaj je stroj prevedeno stranica što je određeno "kako jest" bez jamstava. Machine translation may be difficult to understand. Strojno prevođenje svibanj biti teško za razumjeti. Please refer to Molimo pogledajte original English article original English članak whenever possible. kad god je to moguće.

Share and contribute or get technical support and help at Dionički i doprinose ili dobiti tehničku podršku i pomoć u My Digital Life Forums Moj digitalni život forumi .



2 Responses to “Create New Table by Selecting Data from Other Tables with CREATE TABLE AS” 2 Odgovori na "Kreiraj novu Tablica odabirom podataka iz drugih tablica sa STVORITI STOL AS"

  1. ikarus Ikarus
    April 1st, 2007 03:26 1. travanj 2007 03:26
    1

    We can do it also with the query, Možemo to učiniti i sa upitom,

    SELECT * INTO newtable FROM existingtable SELECT * U newtable OD existingtable

    I think its a little bit shorter. Mislim da svoje malo kraći.

  2. tariq Tarik
    January 10th, 2008 13:31 10. sječnja 2008 13:31
    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???? Podaci u tablici koja je stvorena pomoću stvoriti tablice što odaberete "se razlikuju od podataka koji se vratio kada je isti odaberete da stvara tablice je izvršen odvojeno????
    WE are using the tool PL/SQL Developer . Mi smo pomoću alata za PL / SQL Developer.
    Any idea what this problem is due to? Bilo koji ideja što ovaj problem je zbog?

Leave a Reply Ostavite odgovor

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> Možete koristiti ove 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. Pretplatite se na komentare značajka je onemogućen. To receive notification of latest comments posted, subscribe to Da biste primali obavijesti o najnovijim komentare Posted, pretplatiti se na My Digital Life Comments RSS feed Moj digitalni život Komentari RSS Feed or ili register to receive prijaviti za primanje new comments in daily email digest. nove komentare u dnevni e-mail svariti.
Custom Search

New Articles Novi Članci

Incoming Search Terms for the Article Dolazni Pretraživanje Uvjeti za Članak

create table as select izraditi tablice i odaberite - -- create table select izraditi tablice odaberite - -- create table from select izraditi tablice sa odaberite - -- create table with select izraditi tablice sa odaberite - -- create table as select from izraditi tablice i odaberite s - -- DB2 CREATE TABLE AS SELECT DB2 stvoriti tablice što odaberete - -- create new table stvaranje novih tablica - -- new table myspace Nova tablica MySpace - -- create table as select db2 izraditi tablice i odaberite DB2 - -- select into new table oracle odaberite tablicu u novom proročanstvo - -- db2 create table from select DB2 izraditi tablice sa odaberite - -- add a new section on myspace dodavanje novog odjeljka na MySpace - -- create table as select oracle izraditi tablice i odaberite proročanstvo - -- create table as select izraditi tablice i odaberite - -- ACCESS create table as select PRISTUP stvoriti tablice što odaberete - -- create table select into izraditi tablice odaberite u - -- oracle create table select proročanstvo stvoriti tablice odaberite - -- ms access create table as select MS Access stvoriti tablice što odaberete - -- create new section on myspace stvoriti novo poglavlje na MySpace - -- create table + select izraditi tablice odaberite + - -- create table as select access izraditi tablice i odaberite pristup - -- access create table select pristup stvoriti tablice odaberite - -- all sve - -- create table with data izraditi tablice s podacima - -- create table as select in db2 stvoriti tablice što odabrati u DB2 - -- create table with select into izraditi tablice sa odaberite u - -- add table myspace dodaj stol MySpace - -- CREATE TABLE SELECT DB2 Izraditi tablice odaberite DB2 - -- create table select izraditi tablice odaberite - -- db2 create table as DB2 stvoriti tablice što - -- new table on MySpace novi stol na MySpace - -- create table from another table db2 izraditi tablice iz druge tablice DB2 - -- create table form another table izraditi tablice drugom obliku tablice - -- oracle create table as selecting columns proročanstvo stvoriti tablice što odabira stupaca - -- select new table odaberite novu tablicu - -- create table from select db2 izraditi tablice odaberite iz DB2 - -- myspace new table MySpace nove tablice - -- myspace creating other tables MySpace stvaranje drugih stolova - -- add new table to myspace dodaj novi stol na MySpace - -- add new section on myspace dodaj novi odjeljak na MySpace - -- create a table from select napraviti tablice s odaberite - -- create table as db2 izraditi tablicu kao DB2 - -- add a table to myspace dodavanje tablica na MySpace - -- can create a new table using a SELECT statement može kreirati novu tablicu koristeći Odabrati izjava - -- create table select oracle izraditi tablice odaberite proročanstvo - -- create new table myspace stvaranje novih tablica MySpace - -- create table with select izraditi tablice sa odaberite - -- create table as select in microsoft access stvoriti tablice što odabrati u programu Microsoft Access - -- db2 create table select DB2 kreirati tablice odaberite - -- How To Create a New Table by Selecting Rows from Another Table? Kako Da biste stvorili novu tablicu po Odabir redaka iz drugog Tablica? - --