0
SELECT *
FROM booking  
CASE
WHEN Travel_Date <= getDate() THEN 'Past Travel
ELSE 'Future'
END AS 'Has travel happened'
4

1 に答える 1

1

これを試して:

SELECT *, 
  CASE 
    WHEN Travel_Date <= CURDATE() THEN 'Past Travel' 
    ELSE 'Future' 
  END AS 'Has travel happened' 
FROM booking
于 2013-07-25T16:12:58.360 に答える