2 ms·
You can do a lot to a field that isn't just "give me this field name" like running functions, aliasing it as another name, etc. If you're doing a simple: SELEC
by BeefWellington 5y ago
You can do a lot to a field that isn't just "give me this field name" like running functions, aliasing it as another name, etc. If you're doing a simple:
SELECT a b c d
FROM table
I can understand the appeal, but when you're doing:
SELECT CAST(a AS VARCHAR(8)) as cast_a b c d
FROM table
There's no obvious syntactical way to separate those out, especially since you can get really complex in how you assemble things like aliases when you get into functions, stored procedures, subselets, etc.
PostgreSQL's cast operator syntax (::DATATYPE) can help a bit but it hasn't been standardized.