Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if a column is unique sql

SELECT CASE WHEN count(distinct col1)= count(col1)
THEN 'column values are unique' ELSE 'column values are NOT unique' END
FROM tbl_name;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #column #unique #sql
ADD COMMENT
Topic
Name
5+7 =