最近学习oracle的一些知识,发现自己sql还是很薄弱,需要继续学习,现在总结一下哈. (1)oracle递归查询 start with ... connect by prior ,至于是否向上查询(根节点)还是向下查询(叶节点),主要看prior后面跟的字段是否是父ID. 向上查询:select * from test_tree_demo start with id=1 connect by prior pid=id 查询结果: 向下查询:select * from test_tree…
直接在oracle 递归查询语句 select * from groups start with id=:DeptId connect by prior superiorid =id 往下找 select * from groups start with id=:DeptId connect by prior id=superiorid…
oracle rac 数据库常用命令:1.所有实例和服务的状态srvclt status database -d orcl单个实例的状态:srvctl status instance -d orcl -i orcl1/orcl2在数据库全局命名服务的状态:srvctl status service -d orcl -s orcltest特定节点应用程序的状态:srvctl status nodeapps -n linux1srvctl status nodeapps -n linux2ASM状态…
Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_number='&bug_num'; 检查安装了哪些语言:select nls_language,language_code,installed_flag from fnd_languages where installed_flag in ('I','B'); 检查应用有没有安装:SELECT SUB…
一.基本语法 connect by递归查询基本语法是: select 1 from 表格 start with ... connect by prior id = pId start with:表示以什么为根节点,不加限制可以写1=1,要以id为123的节点为根节点,就写为start with id =123 connect by:connect by是必须的,start with有些情况是可以省略的,或者直接start with 1=1不加限制 prior:prior关键字可以放在等号的前面,…