SQL Server 2012创建动态查询SQL语句
/****** Script for SelectTopNRows command from SSMS ******/
use[CenterControl2] --数据库名称 innner join 内连接
go
select a.[id]
,a.name
,a.status
,b.id from [dbo].[controller] a inner join [dbo].[scene] b on a.id = b.id
go