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 - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -