add "LIMIT 2" to the end of the statement

goose wrote:
Hi All,

I have the following SQL statement

SELECT channel.channel_name, program_title, start_time, finish_time FROM program, channel WHERE program.channel_id='3'
AND
program.channel_id=channel.channel_id UNION SELECT channel.channel_name, program_title, start_time, finish_time FROM program, channel WHERE program.channel_id='2' AND program.channel_id=channel.channel_id;

This produces this:

http://pastebin.ca/283519

However how do I tell it to select JUST the first 2 entries for each
channel??

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

Reply via email to