union來合併兩個表的列

create or replace view treeview as select a.area_id par_Id, 0 men_Id, a.area_name men_Name from area a union select d.area_id, d.department_id , d.department_name from department d 注意兩個表的字段在查詢中對應,要有相同
相關文章
相關標籤/搜索