sql sever查询库中每个表是否存在某个列名 列出表名 select t.TABLE_NAME from information_schema.columns t where t.COLUMN_NAME='列名'; 插入一个字段设为主键类型为 uniqueidentifier 默认值绑定为 newid ALTER TABLE 表名 ADD 列名 uniqueidentifier NOT NULL DEFAULT newid()