create proc addcolumn@tablename varchar(30), –表名@colname varchar(30), –要加的列名@coltype varchar(100), –要加的列类型@colid int –加到第几列asdeclare @colid_max intdeclare @sql varchar(1000) –动态sql语句————————————————–if not exists(select 1 from sysobjectswhere name = @tablename and xtype = ‘u’)beginraiserror 20001 ‘没