db2物化路径模型查询

时间:2015-02-19 08:34:52
【文件属性】:

文件名称:db2物化路径模型查询

文件大小:801B

文件格式:SQL

更新时间:2015-02-19 08:34:52

物化路径模型 db2

-- 物化路径模型 -- 自顶到底的查询 SELECT a.materialized_path, a.commander, a.description FROM t_materialized_model AS a, t_materialized_model AS b WHERE a.materialized_path LIKE CONCAT(b.materialized_path, '%') AND b.description = '雨恬' order by materialized_path -- 自底到顶的查询 SELECT a.materialized_path, a.commander, a.description FROM t_materialized_model AS a, t_materialized_model AS b WHERE b.materialized_path LIKE CONCAT(a.materialized_path, '%') AND b.description = '雨恬' -- 嵌套集合模型 -- description, commander,left_number,rightf_number SELECT a.left_number,a.right_number, a.commander, a.description FROM t_nested_model AS a, t_nested_model AS b WHERE a.left_number between b.left_number, b.right_number and b.description = '雨恬' ORDER BY left_number


网友评论

  • 骗我积分啊,就9行代码?
  • 非常非常好,对初次使用数据库的人帮助不小