Unique record in SQL

How can i get a unique record from a table that have many records about this code. Example :

Records :
code name
---- -----------------------
0001 zzzzzzzzzzzzz
0001 zzzzzzzzzzzzz
0002 ppppppppppppp
0001 zzzzzzzzzzzzz

i need get only :

code name
---- -----------------------
0001 zzzzzzzzzzzzzz
0002 pppppppppppppp

Thanks

Comments

  • Select distinct code,name


    : How can i get a unique record from a table that have many records about this code. Example :
    :
    : Records :
    : code name
    : ---- -----------------------
    : 0001 zzzzzzzzzzzzz
    : 0001 zzzzzzzzzzzzz
    : 0002 ppppppppppppp
    : 0001 zzzzzzzzzzzzz
    :
    : i need get only :
    :
    : code name
    : ---- -----------------------
    : 0001 zzzzzzzzzzzzzz
    : 0002 pppppppppppppp
    :
    : Thanks
    :


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion