我正在尝试在具有一些匹配主键的两个不同服务器上运行 select 语句。我希望能够选择主键,但向每条记录添加前缀“A”
例如:
ID "to this" ID
1 A1
2 A2
3 A3
这就是我的查询内容
select 'A' + CAST (a.id AS VARCHAR(25)) as ID,a.*,':', b.*,':',c.*,':', d.*,':', e.*,'REPORTDT', g.*
from labgen.order_ a
join patient b on a.id = b.chart
join insurance c on b.ins1 = c.code
join client d on d.num = a.client1
join salesgrp e on d.salesgroup = e.num
join reportdt g on a.accession = g.accession
最佳答案
关于mysql - 为 select 语句添加前缀文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39474599/