- Will filter duplicates
- SELECT DISTINCT fields ...
-
SELECT Department
FROM SKU_DATA;
-
SELEET DISTINCT Department
FROM SKU_DATA;
- I inserted a new record into the SKU_DATA table
-
INSERT INTO SKU_DATA
(SKU, SKU_Description, Department, Buyer)
VALUES
(400000,"Junk","Junk","Pete Hansen");
- This puts Pete Hansen into two departments.
- We can undo this with
-
DELETE FROM SKU_DATA
WHERE SKU=400000;
- Try this with and without the extra data.
-
SELECT DISTINCT Department, Buyer
FROM SKU_DATA;
- We are cautioned that DISTINCT may be expensive on large tables.