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 .
Related Articles Povezani članci
- Easily Duplicate, Copy or Backup Tables in Oracle, PostgreSQL, DB2 and SQLite with Create Table As SQL Jednostavno Dvostruki, Kopiraj ili Sigurnosna kopija tablica u Oracle, PostgreSQL, DB2 i SQLite sa Napravite tablicu kao SQL
- Crack and Hack to Find, Reveal, Get, Recover and Retrieve All Windows Passwords with Ophcrack 2 and Rainbow Tables Ispucati i Hack pronaći, otkriti, Get, Spasi i preuzeli sve Windows lozinkama sa Ophcrack 2 i Duga Tablice
- Recover Lost Data with Unistal Data Recovery Spasi izgubio podatke sa Unistal Data recovery
- Data Recovery and Data Protection via Undelete 2009 Podaci za oporavak i zaštitu podataka putem Undelete 2009
- ORA-02449 Oracle Drop Table Error Ora-02449 Oracle drop stol o pogrešci
- ORA-00942 Table or View Does Not Exist Oracle Error Ora-00942 stol ili pogled ne postoji Oracle error
- HTML Color Names HEX Codes Chart Table Html color chart imena Hex kodovi Tablica
- Criss Angle Vanishing Under Table Magic Trick Revealed Criss kut nestajanje pod stolom Magic trik objavi
- Gateway CX2620 Convertible Notebook & Table PC Review by NewsFactor Magazine Gateway CX2620 konvertibilnih Notebook & stolni pc pregled NewsFactor Magazine
- Improved Way to Add SLIC (SLP 2.0) Table into BIOS ACPI to Activate Windows Vista OEM Poboljsani nacin da Dodaj SLIC (SLP 2.0) Stol u BIOS-ACPI da aktivirate sustav Windows Vista OEM


























April 1st, 2007 03:26 1. travanj 2007 03:26
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.
January 10th, 2008 13:31 10. sječnja 2008 13:31
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?