生成两个表的笛卡尔积

declare @objid int,@objname char(40)

set @objname = 'dbo.MyTestView'

select @objid = id from sysobjects where id = object_id(@objname)

select FID,FName ,'Column_name' = name ,'' AS 查看 ,'' AS 更新 ,'' AS 删除 ,'' AS 新增  into MyWeight from syscolumns,MyWorker where id = @objid order by FID,FName

 

posted @ 2014-03-30 17:38  美丽的矩阵  阅读(711)  评论(0编辑  收藏  举报