I have 4 columns a, b c, d in my table (MySQL database) . I want to select the distinct values of ALL of these 4 columns in my table . More deeply my table is given bellow..
a b c d
--------------------------
1 3 3 4
1 2 3 0
1 1 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
In the above table (1,2,3,4) value are repeating 4 times(look the last 4 rows of my table). I want only the distinct one , ie i want to get the bellow table after mysql query..
a b c d
---------------
1 3 3 4
1 2 3 0
1 1 3 4
1 2 3 4
I think you guys got some idea . Im not familier with MySql .
select distinct a,b,c,d from your_table
SELECT DISTINCT column_name,column_name FROM table_name;
I mean
select distinct a,b,c,d from table_name;
Here is the link of w3schools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With