Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 select column names

Author  Topic 

vasanking
Starting Member

1 Post

Posted - 2008-01-30 : 00:53:51
hi it's,

i ve an table wit some column names... some column names have an null values. but i need a column names which does'nt ve an null values while retriving the datas. if any one ve solution plz tel me...

thank you

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-30 : 01:02:45
Cant get you fully? ARe you trying to get NOT NULL values from columns or retrive column names which have NULL values?
Go to Top of Page

TnJMoseley
Starting Member

1 Post

Posted - 2008-02-13 : 13:30:59
If you want to know whether or not the columns are nullable, you can modify this query here:

SELECT
*
FROM
INFORMATION_SCHEMA.Tables T
JOIN INFORMATION_SCHEMA.Columns C
ON T.TABLE_NAME = C.TABLE_NAME
WHERE T.TABLE_NAME NOT LIKE 'sys%' and table_type <> 'view'
AND T.TABLE_NAME <> 'dtproperties'
AND T.TABLE_SCHEMA <> 'INFORMATION_SCHEMA'
ORDER BY T.TABLE_NAME, C.ORDINAL_POSITION

Jules
Go to Top of Page
   

- Advertisement -