CREATE TABLE Sellers(
id INT PRIMARY KEY NOT NULL,
Name varchar(20) NULL,
Age INT NULL,
Salary INT NULL,
)
INSERT dbo.Sellers (id, Name, Age, Salary)
VALUES (1, 'Sara', 61, 3000),
(2, 'Billy', 20, 4500),
(3, 'Dan', 23, 2400),
(4, 'Joe', 35, 7800)
CREATE TABLE Orders(
Number INT NULL,
Order_date date NULL,
Salesperson_id INT NOT NULL,
Amount INT NULL,
)
INSERT dbo.Orders (Number, Order_date, Salesperson_id, Amount)
VALUES (10, '2006-08-02', 2, 540),
(20, '2019-01-03', 2, 1800),
(30, '2015-07-14', 1, 640),
(40, '2018-01-29', 2, 2400),
(50, '2018-02-03', 3, 600),
(60, '2009-03-02', 4, 720),
(70, '2008-05-06', 2, 150),
(80, '2019-01-02', 2, 101),
(90, '2018-06-07', 3, 40)
UPDATE Markers
SET Lat = '1', Lng = '2'
WHERE Id IN (1);
UPDATE Markers
SET Lat = '3', Lng = '4'
WHERE Id IN (2);
UPDATE Markers as row_1 INNER JOIN Markers as row_2
ON
row_1.id = 1 AND
row_2.id = 2
SET
row_1.Lat = '1',
row_1.Lng = '2',
row_2.Lat = '3',
row_3.Lng = '4';