Search
 
SCRIPT & CODE EXAMPLE
 

SQL

update with inner join

UPDATE tb1
SET tb1.column_1 = tb2.column_1
FROM table_1 AS tb1
INNER JOIN table_2 AS tb2
ON tb1.column_2 = tb2.column_3
Comment

inner join update

UPDATE 
    t1
SET 
    t1.c1 = t2.c2,
    t1.c2 = expression,
    ...   
FROM 
    t1
    [INNER | LEFT] JOIN t2 ON join_predicate
WHERE 
    where_predicate;
Comment

update with inner join sql server

UPDATE ProductReviews
SET    ProductReviews.status = '0'
FROM   ProductReviews
       INNER JOIN products
         ON ProductReviews.pid = products.id
WHERE  ProductReviews.id = '17190'
       AND products.shopkeeper = '89137'
Comment

update with inner join sql server

UPDATE R 
SET R.status = '0' 
FROM dbo.ProductReviews AS R
INNER JOIN dbo.products AS P 
       ON R.pid = P.id 
WHERE R.id = '17190' 
  AND P.shopkeeper = '89137';
Comment

PREVIOUS NEXT
Code Example
Sql :: version and edition of SQL Server Database Engine 
Sql :: mysql user 
Sql :: mysql backup database 
Sql :: create delete procedure mysql 
Sql :: sqlite3 import csv 
Sql :: pyspark sql row get value 
Sql :: mysql regexp match word 
Sql :: sql query for getting data with join and count 
Sql :: mysql age by birthdate 
Sql :: for json path sql server 
Sql :: mysql login to a specific database terminal 
Sql :: ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides 
Sql :: postgres user permissions 
Sql :: sql character index 
Sql :: mysql remove records 
Sql :: change password postgres pgserver 
Sql :: sql precent format 
Sql :: sql period overlap 
Sql :: sql select min row 
Sql :: how to ascending order in sql 
Sql :: list table columns mysql 
Sql :: what is a query in sql 
Sql :: athena create table 
Sql :: lower case in sql 
Sql :: function in postgresql 
Sql :: oracle simple quote 
Sql :: query to delete a database in mysql 
Sql :: t-sql check if data exists 
Sql :: sql String comparisons case sensitive 
Sql :: check for directory in bash 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =