sql - select distinct a.* from table query -


i'm on new project , there lot of sql server stored procedures in i'm tasked working on, improving, fixing etc..

i surprised see code this:

select distinct a.*  tbl_applicant 
  1. when code work?
  2. if did work on tables, masking proper results?
  3. what should used instead?

  1. if table tbl_applicant exists
  2. no, it's eliminate dupliacte rows.
  3. select col1,col2 ... tbl_applicant group col1,col2 ... or alias a select a.col1, a.col2 ... tbl_applicant group a.col1,a.col2 ...

Comments