“SQL INSERT IN SELECT” Code-Antworten

Fügen Sie eine Auswahlanweisung in eine Tabelle ein

--format
INSERT INTO Customers (CustomerName, City, Country)
SELECT SupplierName, City, Country FROM Suppliers;

--examples
INSERT INTO Customers (CustomerName, City, Country)
SELECT SupplierName, City, Country FROM Suppliers;
Black Tailed Deer

SQL Server in Select einfügen

INSERT INTO sales.addresses (street, city, state, zip_code) 
SELECT
    street,
    city,
    state,
    zip_code
FROM
    sales.customers
ORDER BY
    first_name,
    last_name; 
LeisureSuit Larry

In die Werte einfügen auswählen

INSERT INTO my_table SELECT * FROM source_table;
INSERT INTO my_table (a, b, c) SELECT a, b, c FROM source_table;
INSERT INTO my_table (a, b, c) SELECT a, b, c FROM source_table s
	WHERE s.my_col >= 10;
VasteMonde

SQL INSERT IN SELECT

INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Envious Echidna

SQL Server in Select einfügen

 INSERT INTO table1
 SELECT col1, col2 , col3 FROM table2
 WHERE your condition;
Ayaz Ullah Sharif

SQL Server in Select einfügen

 INSERT INTO salesTransaction_History
 SELECT * FROM salesTransaction
 WHERE item_Number='Salt-1';
Ayaz Ullah Sharif

Ähnliche Antworten wie “SQL INSERT IN SELECT”

Fragen ähnlich wie “SQL INSERT IN SELECT”

Weitere verwandte Antworten zu “SQL INSERT IN SELECT” auf Sql

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen