我试图运行涉及在JDBC自定义变量向一个MySQL 5.0数据库(休眠4作为ORM)的查询: SET @rownum := 0; SELECT rnum FROM (
SELECT (@rownum := @rownum + 1) AS rnum, col_name_a
FROM table_name
WHERE (col_name_b IS NULL OR col_n
是否可以在查询中设置/读取变量? 伪代码: SELECT animal_name,
@tallest_animal = (select top 1 height from animal order by height desc) as tallest,
@smallest_animal = (select top 1 height from animal order by he