Create New Table by Selecting Data from Other Tables with CREATE TABLE AS Erstellen Sie eine neue Tabelle, indem Sie Daten aus anderen Tabellen mit CREATE TABLE als
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. Durch den Einsatz von SQL-Daten Manipulation Anweisung, ein neues, temporäres, Backup oder regelmäßige Tabelle erstellt werden kann und ausgefüllt oder eingefügt werden mit Daten aus einer anderen Tabelle oder Tabellen abgerufen von SELECT-Anweisung. 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. Die SQL Data Manipulation Language ist CREATE TABLE AS genutzt werden kann, um eine neue Tabelle gebaut von Inhalten durch die Ergebnismenge einer Abfrage in einer Tabelle, die bereits existiert innerhalb der Datenbank. Both the column types, and row data for the new table, come from the SELECT command specified by select. Beide Arten der Spalte, Zeile und Daten für die neue Tabelle, stammen aus dem SELECT-Befehl vom wählen.
CREATE TABLE AS has the following syntax or synopsis in simple form: CREATE TABLE AS hat die folgende Syntax oder Synopse in einfachen Form:
CREATE TABLE new_table_name [ ( column [, ...] ) ] AS SELECT [ ( column [, ...] ) ] FROM existing table_name CREATE TABLE new_table_name [(Spalte [, ...])] AS SELECT [(Spalte [, ...])] aus bestehenden table_name
The SELECT statement can be in a complex form where data is been retrieved from several tables. Die SELECT-Anweisung kann in einer komplexen Form, wo Daten abgerufen wurden aus mehreren Tabellen. For the new table, column names can be specified by including the column names in a comma-delimited list. Für die neue Tabelle, Spalte Namen können angegeben werden, indem die Spaltennamen in einer Komma-getrennte Liste. 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. Sehr wichtiger Punkt zur Kenntnis zu nehmen ist, dass es die gleiche Anzahl von Spalten in der Spalte Liste vor der AS-Klausel (optional, falls angegeben) für die neue Tabelle als die Anzahl der Zielarten Spalten zurückgegeben, die von der SELECT-Anweisung. 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: Wenn das optionale Liste der Spalten in Klammern der neuen Tabelle enthält unterschiedliche Anzahl von Zeilen als die Zeilen der SELECT-Anweisung zurückgibt, wird die folgende Fehlermeldung wird angezeigt:
ERROR: CREATE TABLE/AS SELECT has mismatched column count ERROR: CREATE TABLE / AS SELECT ist falsch Spalte 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 . In seiner einfachsten Form, AS CREATE TABLE-Anweisung wird ein vollständiges Backup einer bestehenden Tabelle mit allen Spalten und Daten einfach, indem Sie die Anweisung CREATE TABLE new_table_name AS SELECT * FROM existing_table_name.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.
Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren .
Related Articles Verwandte Artikel
- Easily Duplicate, Copy or Backup Tables in Oracle, PostgreSQL, DB2 and SQLite with Create Table As SQL Leicht zu duplizieren, kopieren oder Backup-Tabellen in Oracle, PostgreSQL, DB2 und SQLite mit Create Table Wie SQL -
- ORA-00942 Table or View Does Not Exist Oracle Error ORA-00942 Tabelle oder View nicht vorhanden ist Oracle-Fehler
- ORA-02449 Oracle Drop Table Error ORA-02449 Oracle DROP TABLE-Fehler
- Oracle ORA-14074 Create or Add New Partition Fails Error Oracle ORA-14074 schaffen oder neue Partition schlägt fehl, Fehler
- Create, Add or Split Oracle Database Partition Fails with ORA-14080 Error Erstellen, hinzufügen oder Split Oracle Database Partition schlägt fehl mit ORA-14080 Fehler
- Check and Optimize MySQL Database Automatically with Crontab/Cron Prüfen und Optimieren von MySQL-Datenbank automatisch mit crontab / cron
- How to Backup and Restore (Export and Import) MySQL Databases Tutorial Wie Backup-und Restore (Export und Import) Datenbanken MySQL Tutorial
- SLIC Table (SLIC.BIN or ACPISLIC.BIN) BIOS File for OEMs Download SLIC-Tabelle (SLIC.BIN oder ACPISLIC.BIN) BIOS-Datei für OEMs Download
- Oracle EXP-00091 Error When Export Database Oracle exp-00091-Fehler angezeigt, wenn Datenbank exportieren
- Sun Table Transforms Solar Energy to Electricity to Power Up Home Appliances So verwandelt Tabelle Sonnenenergie zu Strom an die Macht bis Haushaltsgeräte

































April 1st, 2007 03:26 1. April 2007 03:26
We can do it also with the query, Wir können es auch mit der Abfrage,
SELECT * INTO newtable FROM existingtable SELECT * INTO newtable AUS existingtable
I think its a little bit shorter. Ich denke, seine ein wenig kürzer.
January 10th, 2008 13:31 10. Januar 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???? Die Daten in der Tabelle, die alle mit den create table AS SELECT "unterscheidet sich von den Daten, die zurückgegeben wird, wenn die gleichen wählen Sie das schafft der Tabelle ausgeführt wird getrennt?
WE are using the tool PL/SQL Developer . Wir benutzen das Werkzeug PL / SQL Developer.
Any idea what this problem is due to? Jede Idee, was das Problem ist darauf zurückzuführen,?