Dinçer Akay wrote:

Hi,

My Table

No | Type | ID

[snip]

Select random "No" (i know rand())
Select two row (i know limit 0,2)
Select Type v,h or h,v but dont want v,v or h,h


How about selecting one random row where "Type" is v and one where "Type" is h and then UNIONing the two record sets?

Stephen


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



  • SQL Dinçer Akay
    • Stephen Moretti (cfmaster)

Reply via email to