sql server - How do I find out if a column is required or nullable using a SQL statement? -


i need know if it's possible know if column "required" or "nullable". can't find information this. there stored procedure let's me know if column required field ?

oracle

select nullable user_tab_columns table_name = 'tablename'     , column_name = 'columnname'; 

sql-server

select is_nullable  sys.columns  object_id = object_id('tablename')      , name = 'columnname'; 

mysql

select is_nullable information_schema.columns table_name = 'tablename'     , column_name = 'columnname'; 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -