To get all the columns in the database which allow NULLS
select table_name,column_name
from information_schema.columns
where is_nullable ='YES'
order by table_name,column_name
-----
select c.table_name,c.column_name,t.table_type
from information_schema.columns c
join information_schema.tables t on c.table_name = t.table_name
where is_nullable ='YES'
and table_type = 'base table'
order by table_name,column_name
----
select table_name,column_name,is_nullable
from information_schema.columns
order by table_name,column_name
-----
select c.table_name,c.column_name,t.table_type
from information_schema.columns c
join information_schema.tables t on c.table_name = t.table_name
where is_nullable ='YES'
and table_type = 'base table'
order by table_name,column_name
----
select table_name,column_name,is_nullable
from information_schema.columns
order by table_name,column_name
No comments:
Post a Comment