动态添加列
来源:互联网 发布:软件功能需求确认书 编辑:程序博客网 时间:2024/05/29 03:46
declare @i int,@tt nvarchar(20)
create table #tbl(id nvarchar(20))
while CHARINDEX(',',@strcourse)>0
begin
set @i=CHARINDEX(',',@strcourse) set @tt=SUBSTRING(@strcourse,1,@i-1)
if not exists(select name from syscolumns where id=object_id('#tbl') and name=@tt)
exec('alter table #tbl add ['+@tt+'] decimal(5,1)')
set @strcourse=SUBSTRING(@strcourse,@i+1,LEN(@strcourse)-@i)
end
select * from #tbl
create table #tbl(id nvarchar(20))
while CHARINDEX(',',@strcourse)>0
begin
set @i=CHARINDEX(',',@strcourse) set @tt=SUBSTRING(@strcourse,1,@i-1)
if not exists(select name from syscolumns where id=object_id('#tbl') and name=@tt)
exec('alter table #tbl add ['+@tt+'] decimal(5,1)')
set @strcourse=SUBSTRING(@strcourse,@i+1,LEN(@strcourse)-@i)
end
select * from #tbl
- datagrid动态添加列
- 动态添加table列
- datagrid 动态添加列
- GridView 动态添加列
- gridview动态添加列
- jqGrid添加动态列
- 动态添加模板列
- DataGrid动态添加列
- KDTable 动态添加列
- 动态更新(添加)列
- gridView动态添加列
- 动态添加TemplateField列
- 动态添加列
- 动态添加列
- sql动态添加列
- JavaScript 动态添加列
- easyui动态添加列
- GridView动态添加列
- (android 功能代码)Android网络请求库——android-async-http .
- 二值化轮廓图像轮廓点坐标顺时针获取matlab程序
- UVa 10970 - Big Chocolate
- 用dojo checkstyle扫描代码
- jquery 的一些操作
- 动态添加列
- Valid signing identity not found解决办法(原有IDP私钥丢失)
- 让js代码等页面加载完成之后执行
- foreach 嵌套递归二维数组
- log4j配置讲解
- web API 错误处理The 'ObjectContent`1' type failed to serialize
- 腾讯实习生笔试2012
- 配置文件struts.xml中 namespace 和 result 格式
- 数据结构上机题目4--后缀表达式求值