EXPERT RESPONSE
SQL itself doesn't use line feed characters because the line feed character,
like the space and the carriage return character, is considered "white space."
SQL treats all consecutive "white space" characters as a single space.
Therefore, this query --
select foo
from bar
where fap = 'qux'
is interpreted the same way as this query --
select foo from bar where fap = 'qux'
However, the former style (multi-line, with indentation) is a lot easier
to read and understand than the single-line monolithic query style,
especially for larger queries.
The only time you'd need to know its ASCII value is when, for example,
you're searching for data values containing a line feed
character. In that case, you are looking for a single byte with the
binary value 0110, which is equivalent to decimal 10
or hexadecimal 0A. In standard SQL, you can use "X" notation to
represent hexadecimal characters. For example,
select username, body
from comments
where body like '%' || x'0A' || '%'
This finds all comments where the body contains a line feed character.
|