MySQL Forums
Forum List  »  Newbie

Problems w/ Case Statement
Posted by: clem c rock
Date: August 01, 2005 01:07PM

Hello,

I'm trying to select specified entries from a table and display a specific record first by it's record ID and then the rest of the selected records after that.

Here's what I'm trying so far


SELECT id, title,
CASE
WHEN id = 52 THEN 52 WHEN id != 53 THEN id
END
FROM doctor
LIMIT 0, 50

When I try this, all that's displayed is the first 50 records from the database just as if I wrote the SELECT statement like this:

SELECT id, title FROM doctor LIMIT 0, 50

Any ideas?

Options: ReplyQuote


Subject
Written By
Posted
Problems w/ Case Statement
August 01, 2005 01:07PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.