• Good question.

    But I don't like the wording of the first sentence of the explanation: "...an expression is a valid numeric type"; well, 1 is not a valid numeric type, it's a numeric literal representing a value (or values, if your version of type theory doesn't allow types which overlap) belonging to several numeric types. And '$' is not a valid numeric type, it's a string literal which can be used to represent a value of the money (or smallmoney) type; and so on.

    I almost fell over on '#', thinking something like "surely SQL has an octal form for integer literals, does it begin with a #"; but then I noticed that all 1s wasn't an option, which, since all the others clearly are numeric, forced me to remember that SQL is a bit more modern than my early days in computing.

    Those days of course were right back when many machines didn't use the 8 bit bytes for which hexadecimal is a sensible form, octal was widely used for machines with 6 bit characters and 24-bit or 36-bit words and often indicated by # and there were various 6-bit character codes which existed alongside alongside the machines using various 8 bit character codes and 16 bit and 32 bit words which used hex. Even 5-bit characters were often used in data comms (because telex was based on them so there were async modems which had 5 data bits per character hardwired) although I never came across a machine where the wordlength was a multiple of 5 or base 32 numeric string literals were used.

    Tom