How can I create a blank/hardcoded column in a sql query?

前端 未结 6 831
刺人心
刺人心 2020-12-15 15:39

I want have a query with a column that is a hardcoded value not from a table, can this be done? I need it basically as a placeholder that I am going to come back to later a

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 16:33

    The answers above are correct, and what I'd consider the "best" answers. But just to be as complete as possible, you can also do this directly in CF using queryAddColumn.

    See http://www.cfquickdocs.com/cf9/#queryaddcolumn

    Again, it's more efficient to do it at the database level... but it's good to be aware of as many alternatives as possible (IMO, of course) :)

提交回复
热议问题