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 .



2 Responses to “Create New Table by Selecting Data from Other Tables with CREATE TABLE AS” 2 Responses to "Neue Tabelle durch Auswahl von Daten aus anderen Tabellen mit CREATE TABLE-AS"

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

    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.

  2. tariq Tariq
    January 10th, 2008 13:31 10. Januar 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???? 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,?

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> Sie können diese Tags: <a href= title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Abonnieren ohne zu kommentieren


Custom Search

New Articles Neue Artikel

Incoming Search Terms for the Article Eingehender Suchbegriffe für den Artikel

create table as select create table AS SELECT - -- create table select Tabelle erstellen, wählen Sie - -- create table from select create table wählen Sie aus - -- create new table neue Tabelle - -- DB2 create table as select DB2-Tabelle erstellen, wählen Sie als - -- make a new section on myspace einen neuen Abschnitt in myspace - -- create table with select create table mit ausgewählten - -- create table select Tabelle erstellen, wählen Sie - -- db2 create table as db2 create table als - -- create table from select statement create table aus select-Anweisung - -- create table as select create table AS SELECT - -- create table as select access create table AS SELECT Zugang - -- new table myspace neue Tabelle MySpace - -- Create table using select Erstellt eine Tabelle mit SELECT - -- how to make a new section on myspace wie man einen neuen Abschnitt in myspace - -- oracle create table as select Oracle create table AS SELECT - -- create table select access create table Zugang wählen Sie - -- db2 create table from select DB2-Tabelle erstellen, wählen Sie aus - -- db2 create table select DB2-Tabelle erstellen, wählen Sie - -- access create table as select Zugang erstellen Tabelle AS SELECT - -- access create table select Zugang erstellen Tabelle auswählen - -- new section on myspace neuer Abschnitt auf MySpace - -- oracle create table select Oracle erstellen Tabelle auswählen - -- create table as select db2 create table AS SELECT DB2 - -- create table from other tables create table aus anderen Tabellen - -- create table with data create table mit Daten - -- myspace create new table MySpace neue Tabelle erstellen - -- DB2 create table from another table DB2-Tabelle erstellen, aus einer anderen Tabelle - -- create new myspace table Schaffung neuer MySpace Tabelle - -- ORACLE CREATE TABLE SELECT * FROM ORACLE create table select * from - -- create table from select * create table aus select * - -- create table select from create table wählen Sie aus - -- access create table from select Zugang erstellen Tabelle aus wählen Sie - -- create table select as Tabelle erstellen, wählen Sie als - -- add new section on myspace Hinzufügen neuer Abschnitt auf MySpace - -- create table select db2 Tabelle erstellen, wählen Sie DB2 - -- create table as select oracle create table Oracle AS SELECT - -- access create table as Zugang erstellen Tabelle als - -- myspace new table MySpace neue Tabelle - -- CREATE TABLE AS SELECT IN ACCESS Create table AS SELECT in Access - -- create table from another table in db2 create table aus einer anderen Tabelle in DB2 - -- create a table in myspace Erstellen Sie eine Tabelle in der MySpace - -- MAKE A TABLE FOR MYSPACE Machen Sie eine Tabelle für myspace - -- create table from other table create table aus anderen Tisch - -- make another table on myspace eine weitere Tabelle auf MySpace - -- ms access create table select MS Access-Tabelle erstellen, wählen Sie - -- create new section Schaffung neuer Abschnitt - -- oracle create table from select Oracle erstellen Tabelle aus wählen Sie - -- create table with select statement create table mit select-Anweisung - -- create new table from existing table in oracle neue Tabelle aus bestehenden Tabelle in Oracle - --