如果我的表tb包含一些数据,请说:

A   B 
__|__
1 | 1
2 | 2

有没有一种方法可以执行SELECT * FROM tb以及函数选择,例如SELECT NOW()并以类似以下内容结束:

1 | 1 | datetime
2 | 2 | datetime

或者,如果有任何不同,则在SELECT * FROM tb WHERE A=1SELECT NOW()中给出

1 | 1 | datetime 1 | 1 | datetime

===============>>#1 票数:1 已采纳

是的,就像:-

select A, B, now() as some_column_name from tb;

要么 :-

select A,B from tb
inner join (select now()) as date_time
where A=1;

  ask by richard translate from so

未解决问题?本站智能推荐: