select distinct(工点名称) from XSdcTable union select distinct(工点名称) from XStpTable union select distinct(工点名称) from XSkcTable union select distinct(工点名称) from XSsjTable union select distinct(工点名称) from XStjTable union all不去重的哦,用union
select 工点名称 from( select distinct 工点名称 from XSdcTable union select distinct 工点名称 from XStpTable union select distinct 工点名称 from XSkcTable union select distinct 工点名称 from XSsjTable union select distinct 工点名称 from XStjTable )t
union
select distinct(工点名称) from XStpTable
union
select distinct(工点名称) from XSkcTable
union
select distinct(工点名称) from XSsjTable
union
select distinct(工点名称) from XStjTable
union all不去重的哦,用union
select distinct 工点名称 from XSdcTable
union
select distinct 工点名称 from XStpTable
union
select distinct 工点名称 from XSkcTable
union
select distinct 工点名称 from XSsjTable
union
select distinct 工点名称 from XStjTable
)t
不过你= '" + listBox1.Text + "'";
这个是啥?还有个字段要等于你这个值?那就应该是where 字段=...
你where都没能不报错么- -