Popular Posts

SQLblog.com - The SQL Server blog spot on the web

Tuesday, August 29, 2017

Query Help

SQLServerCentral » Latest topics
Query Help
Here is the basic schema of table
CREATE TABLE Test (ID INT, ProductCode VARCHAR(50), Quantity INT)

INSERT INTO Test
SELECT 1,'ABC', 1
UNION
SELECT 2, 'DEF', 2
UNION
SELECT 3, 'GEH', 1
UNION
SELECT 4, 'XYZ', 3

No comments: