---
title: "两列取最大值"
author: "mac.zhao"
date: "2011-03-02T15:16:23Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2011-03-02T15:16:23Z"
id: 938331
url: "https://mac-zhao.iteye.com/blog/938331"
---

SELECT
case when myaln_price_one>myaln_price_two  then myaln_price_one
else myaln_price_two
end
FROM `gootop_room` 
where room_id = 51