I have this mysql query :
Select name from my_table
This query return me this result :
NAME
-------
name1
name2
name3
How can I create a virtual column and set a defaut value in this column ?
I want this result :
NAME | Virtual Column
------------------------
name1 | defaut_value
name2 | defaut_value
name3 | defaut_value
Like this:
This is legal this way, because in the
SELECTclause you can select what so called, in the SQL standard, a value expression. Where value expression can be either of the following1:1: This image from: SQL Queries for Mere Mortals(R): A Hands-On Guide to Data Manipulation in SQL