create proc addcolumntablename 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 = tablen