What Data Type is Returned by a Mathematical Function?

This question was asked last week by Nicklas Westerlund. His attempts to answer the question are fascinating and creative. But they did make me wonder why MySql has a reputation for being developer friendly and easier to use than Oracle.

And then I refer to the Data Types Table in the documenation to find out that Typ=2 is a number (surprise!).

I also know that this particular number takes 6 bytes, and I know the value in each of these bytes.

It may seem that the DUMP function is useless, except maybe to debug performance issues related to math functions. However, from my experience it can be used to impress colleagues. Show them the bytes and they’ll think your are a guru at least until the next time you make a mistake and crash production.

Like this:

LikeLoading...

Related

3 Comments on “What Data Type is Returned by a Mathematical Function?”

Another handy way to make people believe you are omnipotent is to run a 10046 trace running (level 8 or 12 for preference) and tail -f the trace file. Mumbling incoherently and pointing at the screen occasionally as the output scrolls up the screen….