怎么判断出一个表的哪些字段不允许为空?

注意:非空字段不一定就是主键
---------------------------------------------------------------

select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where IS_NULLABLE='NO' and TABLE_NAME=tablename

在sql2000下测试通过

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus