在SQL 2000数据库中查找所有可为空的列

Kul*_*MCA 6 sql sql-server null constraints

如何找出整个数据库中插入允许的NULL值的列?

Jho*_*re- 11

我手头没有sql,但查询就是这样的

  SELECT * FROM information_schema.columns WHERE is_nullable = 'YES'
Run Code Online (Sandbox Code Playgroud)

通常,搜索此标准视图,以获取有关数据库架构和结构的所有元数据信息; 还有很多其他的(information_schema.tables,information_schema.constraints等)