20200409-create_view.sql 628 B

123456
  1. CREATE OR REPLACE VIEW v_select_all_from_crux AS
  2. SELECT c.id, c.course_title AS title, c.image_url, c.gmt_created, c.intro, "" AS classtype , "" AS content, "" AS qrcode_url , "course" AS hard_code FROM course_introduce c WHERE c.is_del = '0'
  3. UNION ALL
  4. SELECT n.id, n.new_title AS title, n.image_url, n.gmt_created, n.intro, n.classtype, n.content, "" AS qrcode_url , "newspaper" AS hard_code FROM new_papers n WHERE n.is_del = '0'
  5. UNION ALL
  6. SELECT v.id, v.vr_title AS title, v.image_url, v.gmt_created, "" AS intro, "" AS classtype, "" AS content, v.qrcode_url , "vrdetails" AS hard_code FROM vr_details v WHERE v.is_del = '0'