how to check duplicate column in sql code example
Example 1: sql query to find duplicates in column
SELECT name, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1
Example 2: duplicate a column in sql
ALTER TABLE Table1
ADD SubCategory2 {Type of subcategory 1} {NULL|NOT NULL}
UPDATE Table1 SET SubCategory2 = SubCategory;