Mattis Seehaus Mattis Seehaus - 1 year ago 179
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.

Answer Source

If you want to eliminate duplicates use DISTINCT

DISTINCT Number,Value  FROM table


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download