filmov
tv
How to Update Data in One table from another table | Updating a table from another table in sql

Показать описание
Hello All,
Welcome to the Atharv Guruji channel.
Please like the video and subscribe to the channel.
SQL Queries: -
CREATE TABLE EMP
(
EMPID int IDENTITY(1,1),
EMPNAME VARCHAR(20),
AGE INT
)
INSERT INTO EMP VALUES
('RAM',23),
('SHYAM',27),
('Nikhil',24),
('Ranvir',21)
CREATE TABLE EMPLOYEES
(
EMPLOYEESID int IDENTITY(1,1),
EMPLOYEESNAME VARCHAR(20),
AGE INT
)
INSERT INTO EMPLOYEES VALUES
('Atharv',20),
('Aditi',21),
('Sona',24),
('Shiv',21)
SELECT * from EMP
SELECT * from EMPLOYEES
UPDATE E SET
EMPNAME=EY.EMPLOYEESNAME,
AGE=EY.AGE
FROM EMP E INNER JOIN EMPLOYEES EY
ON E.EMPID=EY.EMPLOYEESID
Keywords:
How to update data in one table from another table
SQL update from another table
Update table from another table SQL
First Power BI Report for Beginners
Rolling Calendar in Power BI
2nd highest salary using Offset
Primary Key
Print star pattern in sql
#sql
#sqlinterviewquestionsandanswers
#sqlserver
#Updatedata
Welcome to the Atharv Guruji channel.
Please like the video and subscribe to the channel.
SQL Queries: -
CREATE TABLE EMP
(
EMPID int IDENTITY(1,1),
EMPNAME VARCHAR(20),
AGE INT
)
INSERT INTO EMP VALUES
('RAM',23),
('SHYAM',27),
('Nikhil',24),
('Ranvir',21)
CREATE TABLE EMPLOYEES
(
EMPLOYEESID int IDENTITY(1,1),
EMPLOYEESNAME VARCHAR(20),
AGE INT
)
INSERT INTO EMPLOYEES VALUES
('Atharv',20),
('Aditi',21),
('Sona',24),
('Shiv',21)
SELECT * from EMP
SELECT * from EMPLOYEES
UPDATE E SET
EMPNAME=EY.EMPLOYEESNAME,
AGE=EY.AGE
FROM EMP E INNER JOIN EMPLOYEES EY
ON E.EMPID=EY.EMPLOYEESID
Keywords:
How to update data in one table from another table
SQL update from another table
Update table from another table SQL
First Power BI Report for Beginners
Rolling Calendar in Power BI
2nd highest salary using Offset
Primary Key
Print star pattern in sql
#sql
#sqlinterviewquestionsandanswers
#sqlserver
#Updatedata