UPDATE from SELECT w jednym zapytaniu

13:36 0 Comments

wersja draft


UPDATE
    Table_A
SET
    Table_A.col1 = Table_B.col1,
    Table_A.col2 = Table_B.col2
FROM
    Some_Table AS Table_A
    INNER JOIN Other_Table AS Table_B
        ON Table_A.id = Table_B.id
WHERE
    Table_A.col3 = 'cool'


SQL Insert into … values ( SELECT … FROM … )
How to perform an IF…THEN in an SQL SELECT?
Add a column with a default value to an existing table in SQL Server
How to return the date part only from a SQL Server datetime datatype
SQL update from one Table to another based on a ID match
Inserting multiple rows in a single SQL query?
SQL update query using joins
How can I do an UPDATE statement with JOIN in SQL?
Update a table using JOIN in SQL Server?
Update a column from multiple columns in SQL Server
Hot Network Questions

ziomyslaw

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.

0 komentarze: