Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果可能的话,我想在 MySQL 视图中创建一个不存在的字段。
说select * from authors
select * from authors
然后,如果存在一个字段并且它是 1,我想添加一个字段image并为其分配一个值tick.gif。这可能吗?
image
tick.gif
这样我就可以轻松地使用一个相当闪存的网格程序!
你可以试试
select a.*, if(a.living = 1, "tick.gif", NULL) as image from authors a