Mattis Seehaus Mattis Seehaus - 11 months ago 86
SQL Question

SQL-Command: How do i get distinct value out of multiple lines?

i have a a table like this:

X Y Number Value
asd xcv 1111 A1
ads xvc 1111 A1
qwe rtz 2222 A2
qew zrt 2222 A2

I want to have a Query that references to Number but gives me as a result just ONE Line/Cell with Value. Sth. like:

select *
from datatable
where number = "..."
-->gives me value ONCE

in my opinion it´s no "distinct-command"-issue, but i hope you´ll understand what i mean.


If you want to eliminate duplicates use DISTINCT

DISTINCT Number,Value  FROM table