check collumn for same values.
#1

Hi,

How with mysql query check is there same value of collumn? like i have inserts, and i want all numbers will by different, but now i want to check is there any two insert that are same.
Reply
#2

pawn Код:
SELECT column_name FROM table_name GROUP BY column_name HAVING count(*) > 1
Haven't tested this since I'm unable to at the moment, but you could try this and see if it works.
Reply
#3

http://www.w3schools.com/sql/sql_unique.asp

Use that in future so each ID is unique.

Make a query and if the number of rows returned is more than 1, you have rows with identical values.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)