【发布时间】:2011-09-23 04:53:03
【问题描述】:
我有一个有 10 列的表,有 id、f_name、l_name ..... low_range、high_range、...
我想写一个查询来打印我所有的表,但只有这个 low_range 和 high_range 需要转换成十六进制。
我知道两件事:
1. We can write all the column names and replacing the
low_range with hex(low_range) and high_range with high_range.
但这要求我两个写所有的列名,这似乎有点不公平。
2. We can write a query like:
select t.*, hex(low_range), hex(high_range) from table t
但它会先给出所有列名,然后是十六进制的必填字段,我不想这样做,因为有重复的信息。
有没有其他干净的方法来实现这件事。
PS:我是数据库新手。
【问题讨论】: