I've got a table getting 10 posts, with id, f_title, l_title ..... low_range, high_range, ...
I wish to write a question that will print my table, but simply this low_range and_range to become converted in hex.
I understand a couple of things:
1. We can write all the column names and replacing the low_range with hex(low_range) and high_range with high_range.
but this asks me two to create all of the column names, which appears a little unfair.
2. We can write a query like: select t.*, hex(low_range), hex(high_range) from table t
However it can give all of the column names first and so the needed fields in hex also after them, which I'd rather not as there's a repeating information.
Can there be every other clean way to do this factor.
PS: I'm a new comer to databases.
In a nutshell, no. The 2 ways you list would be the only two methods to specify column output order, so that you can either:
select t.*after which append your custom fields towards the finish (or even the beginning) OR
List each area individually eg
select t.field1, t.field2, hex(t.field3), t.field4...
The 2 techniques you describe would be the only ways to get this done.