0

I want make a query to retrieve only those records from table which are unique on the basis of some coloumns

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by plazmo
0
create table student9(roll int)
insert into student9 values(1)
insert into student9 values(1)
insert into student9 values(2)
insert into student9 values(3)
select distinct * from student9
0
create table student9(roll int)
insert into student9 values(1)
insert into student9 values(1)
insert into student9 values(2)
insert into student9 values(3)
select distinct * from student9

It is retrieval of unique records from table but I want retrieval of those records which are unique on some coloumns eg if table have 5 coloumns I want to retrieve only those records which are unique on 3 coloumns suppose a student table stores details of all college students I want to retrieve those records which are unique on name and address

0

It is retrieval of unique records from table but I want retrieval of those records which are unique on some coloumns eg if table have 5 coloumns I want to retrieve only those records which are unique on 3 coloumns suppose a student table stores details of all college students I want to retrieve those records which are unique on name and address

just replace the * with the column names...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.