将SQL表中的数据导出成一批INSERT语句.
select 'insert into UserRight (ID, parentId, rightId, rightType, userGrade, isDefault, url, module, menuname)
values ('+ convert(varchar,ID)+','+ convert(varchar,parentId)+','+ convert(varchar,rightId)+','''+ rightType +''','+ convert(varchar,userGrade)+','+ convert(varchar,isDefault)+','''+ url +''''+','''+ module +''''+','''+ menuname +''')' from UserRight
重要的是控制好字符串的引号就可以了...
浙公网安备 33010602011771号