Doubt regarding a query
-
I have a doubt regarding writing a query, I have table as below Server ID - Bag ID for example, It has 'n' number of rows here, server id is unique and bag id can be duplicated sometimes. I want to write a query for accessing only bag id's which are not duplicated. How do I frame a query???
-
I have a doubt regarding writing a query, I have table as below Server ID - Bag ID for example, It has 'n' number of rows here, server id is unique and bag id can be duplicated sometimes. I want to write a query for accessing only bag id's which are not duplicated. How do I frame a query???
Hi, I create a table with ServerID and BagID and insert records like this: INSERT INTO tbServer VALUES (1,1), (2,1), (3,2), (4,3), (5,3), (6,4) Here is the query: SELECT DISTINCT BagID FROM tbServer GROUP BY BagID HAVING COUNT(BagID) = 1; I hope this will help you ...