SQL - get list of different values from column

Ing. Michal Hudak

I have table in MySql where I have column type

in this column type are different types

each row in table have type,

how to get list of those values ( not repeating = DISTINCT) ?

example:

id    name    type
-------------------
1     apple   fruit
2     onion   vegetable
3     banana  fruit

List:

fruit
vegetable

Idea:

SELECT `type` FROM `food` WHERE ...
Blood-HaZaRd

In order to get distinct Data You Use DISTINCT

SELECT DISTINCT TYPE FROM FOOD

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL - get list of different values from column

From Dev

Get values from SQL table along with column name as list in Python

From Dev

Get values from SQL table along with column name as list in Python

From Dev

Get Values from a column with different values in another

From Dev

get sum of column values from SQL query

From Dev

match and replace different values in same column from list

From Dev

match and replace different values in same column from list

From Dev

Get a new array with column values from two different arrays in android

From Dev

SQL - Selecting a column from another table twice with different values

From Dev

Splitting values from one column into multiple columns in SQL with different delimiters

From Dev

SQL select values from a column by different ids that all have this value

From Dev

How to get the desired values from a list of multiple different kind of strings

From Dev

Linq Query to get two different values from a single list

From Dev

How to get list of one column values from DataTable?

From Dev

Get a list of values of one column from the results of a query

From Dev

How to get list of one column values from DataTable?

From Dev

Get list of values from multiple tabs and copy to a column in another sheet?

From Dev

Extracting Values From Two-Level XML List Into SQL Column

From Dev

Update list of time values from single column in SQL Server?

From Dev

using Case get values from different table in sql server

From Dev

How to get two values from the two different tables in the same SQL

From Dev

Based on a variable: SQL Query to fetch data for multiple values from one column OR get all values from that column

From Dev

get values from a column based on first occurrences of numbers from a different column - Matlab

From Dev

get values from a column based on first occurrences of numbers from a different column - Matlab

From Dev

sql query get multiple values from same column for one row

From Dev

How to get unique values from specific column in SQL Server?

From Dev

Get multiple values in one column from SQL query

From Dev

SQL query to get computed values from the same column in one row

From Dev

How to get unique values from specific column in SQL Server?

Related Related

  1. 1

    SQL - get list of different values from column

  2. 2

    Get values from SQL table along with column name as list in Python

  3. 3

    Get values from SQL table along with column name as list in Python

  4. 4

    Get Values from a column with different values in another

  5. 5

    get sum of column values from SQL query

  6. 6

    match and replace different values in same column from list

  7. 7

    match and replace different values in same column from list

  8. 8

    Get a new array with column values from two different arrays in android

  9. 9

    SQL - Selecting a column from another table twice with different values

  10. 10

    Splitting values from one column into multiple columns in SQL with different delimiters

  11. 11

    SQL select values from a column by different ids that all have this value

  12. 12

    How to get the desired values from a list of multiple different kind of strings

  13. 13

    Linq Query to get two different values from a single list

  14. 14

    How to get list of one column values from DataTable?

  15. 15

    Get a list of values of one column from the results of a query

  16. 16

    How to get list of one column values from DataTable?

  17. 17

    Get list of values from multiple tabs and copy to a column in another sheet?

  18. 18

    Extracting Values From Two-Level XML List Into SQL Column

  19. 19

    Update list of time values from single column in SQL Server?

  20. 20

    using Case get values from different table in sql server

  21. 21

    How to get two values from the two different tables in the same SQL

  22. 22

    Based on a variable: SQL Query to fetch data for multiple values from one column OR get all values from that column

  23. 23

    get values from a column based on first occurrences of numbers from a different column - Matlab

  24. 24

    get values from a column based on first occurrences of numbers from a different column - Matlab

  25. 25

    sql query get multiple values from same column for one row

  26. 26

    How to get unique values from specific column in SQL Server?

  27. 27

    Get multiple values in one column from SQL query

  28. 28

    SQL query to get computed values from the same column in one row

  29. 29

    How to get unique values from specific column in SQL Server?

HotTag

Archive