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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -