using or in mysql and merging columns
Posted
by Pradyut Bhattacharya
on Stack Overflow
See other posts from Stack Overflow
or by Pradyut Bhattacharya
Published on 2010-04-23T03:50:47Z
Indexed on
2010/04/23
3:53 UTC
Read the original article
Hit count: 408
I can select using or with the sql statement
select f.userid, f.friend_userid from friends f where userid = 1 or friend_userid = 1;
now in the output i have to merge the two rows(userid and friend_userid) into one row
such that only the rows without 1 are displayed
I m using mysql....
Thanks
Pradyut
India
© Stack Overflow or respective owner