coding style - SQL - Select null as FIELDNAME? -
i have come across code says
select null unitcost, null markup
what doing? getting field names unitcost , markup?
why use "select null as..."?
new sorry.
thanks.
that code aliasing value null
, calling unitcost
/markup
. not selecting column available table.
you see when statement requires matching column sets, e.g. union all
.
select id, col1, col2, null unitcost, null markup table_1 union select id, null col1, null col2, unitcode, markup table_2
Comments
Post a Comment