从 db2 中的 VIEWS 查询数据

Query data from VIEWS in db2

我正在尝试从 db2 中的 VIEWS 查询数据,但我的查询不正确。

SELECT TRIM(NAME),TRIM(ADDRESS) 
  from SYSCAT.VIEWS 
  where TYPE = 'V'
  and TABSCHEMA = 'work.SCHEMA'
  and tabname IN ('EMPLOYEE');

架构>视图>雇员

上面的查询returns只有数据在 Employee

1.First Schema in query

查询:'create schema schema_name'

示例:'create schema tbl'

2.create a view in query

query:'创建视图view_name 作为 select*来自table_name'

只需单击 link 即可了解架构和查看

Go to learn a view in Sql

Go to learn in schema in Sql