sql - MySQL: add element to result array -


is there way can add integer each entry in result array returned sql query?

for example query like:

select * mytable 

is there can add statement add column resulting array specified integer in it?

try this:

select *, 1 newcol  mytable 

you can set specific type of field using cast this:

select *, cast(1 decimal(4,2)) newcol mytable 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -