“SQL Insert ke Select” Kode Jawaban

Masukkan pernyataan pilih ke dalam tabel

--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 Insert ke Select

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

Masukkan ke dalam Nilai Pilih

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 ke Select

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

SQL Server Insert ke Select

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

SQL Server Insert ke Select

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

Jawaban yang mirip dengan “SQL Insert ke Select”

Pertanyaan yang mirip dengan “SQL Insert ke Select”

Lebih banyak jawaban terkait untuk “SQL Insert ke Select” di Sql

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya