db2 select * where by other name from another table

时间:2015-01-19 11:32:40

标签: db2

我想找到特定表的所有属性,其值不为null。我尝试了以下方法,但在WHERE条件下,我无法访问s.colname。你能救我吗?

SELECT s.colname
FROM syscat.columns s
WHERE s.tabschema = 'IMDB' and s.tabname = 'MOVIES' and EXISTS (SELECT count(s.colname) FROM imdb.movies WHERE s.colname NOT NULL)

0 个答案:

没有答案