还有能用的校友录吗:db2中引号如何引用变量

来源:百度文库 编辑:高考问答 时间:2024/05/02 07:48:48
select * from A where ('今天'|| (select week from B where cd = 1))=A.message

如果select * from A where ('今天'|| '星期四')=A.message这么检索结果正确。

如何将'星期四'替换成红色部分
如何将'星期四'替换成(select week from B where cd = 1)部分

要看你用的是什么数据库。 有的不支持 套嵌查询似乎。
你得sql没有错误。