Search
 
SCRIPT & CODE EXAMPLE
 

SQL

insert update sql server

--MERGE SQL statement - Part 1

--Create a target table
CREATE TABLE Products
(
   ProductID INT PRIMARY KEY,
   ProductName VARCHAR(100),
   Rate MONEY
) 
GO

--Insert records into target table
INSERT INTO Products
VALUES
   (1, 'Tea', 10.00),
   (2, 'Coffee', 20.00),
   (3, 'Muffin', 30.00),
   (4, 'Biscuit', 40.00)
GO

--Create source table
CREATE TABLE UpdatedProducts
(
   ProductID INT PRIMARY KEY,
   ProductName VARCHAR(100),
   Rate MONEY
) 
GO

--Insert records into source table
INSERT INTO UpdatedProducts
VALUES
   (1, 'Tea', 10.00),
   (2, 'Coffee', 25.00),
   (3, 'Muffin', 35.00),
   (5, 'Pizza', 60.00)
GO

SELECT * FROM Products
SELECT * FROM UpdatedProducts
GO
Comment

PREVIOUS NEXT
Code Example
Sql :: if mysql UPDATE 
Sql :: insert overwrite table in mysql in nifi 
Sql :: SELECT statement to find the specific cell in database table 
Sql :: oracle database status v$logfile 
Sql :: identitye atama yapma SQL 
Sql :: psql list view rules 
Sql :: exectuer myssql .sql 
Sql :: oracle change password expiration policy 
Sql :: oracle activate program 
Sql :: order child below the parent in mysqli 
Sql :: SQL - Row Number into Alphabetical characters 
Sql :: shortcut run sql pgadmin 
Sql :: contraint default SQL 
Sql :: search all tables in a database for a value 
Sql :: how to get n result in sql 
Sql :: ms sql bacup table 
Sql :: sql database column values restrict 
Sql :: mysql aspas simples 
Sql :: select multiple columns count one column and group by one column in one table 
Sql :: sql fetch next 10 rows pdo 
Sql :: mysql missin expression near on 
Sql :: SQL AS With Expression 
Sql :: unpdate pl sql 
Sql :: how do you execute the fragment or sqlBatch using scriptdom 
Sql :: cara menampilkan tabel yang tidak mengandung kata di sql server 
Sql :: plsql function that return a table 
Sql :: sql menampilkan data tabel 
Sql :: sql gap missing values 
Sql :: Resulting Query 
Sql :: FILENAME /usr/bin/mysql does not exists. Make sure correct path is set in /etc/dump admin/settings.conf. 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =