Add a column to all MySQL Select Queries in a single shot

后端 未结 2 826
既然无缘
既然无缘 2021-01-24 21:10

Trying to add a comment to all MySQL Select Queries in my web application at runtime.

For example, the original queries in the code looks like:

select a,         


        
2条回答
  •  南笙
    南笙 (楼主)
    2021-01-24 21:52

    If your goal is to add an extra column with a constant value, try giving it an alias:

    SELECT a, b, c, "TESTVALUE" AS `new_column` FROM ...
    

提交回复
热议问题