MySQL视图创建

create or replace view v_user_info as
select    
          'SCYB' as `医保注册编码`,
          t.hilist_code as `医保编码`,
          t.hilist_name as `医保名称`,
          t.pinyin as `拼音码`,
          t.chrgitm_lv as `收费项目等级`,
          null as `收费项目自付比例`,
          t.spec as `规格`,
          t.aprvnpo as `批准文号`,
          t.begn_date as `有效期开始时间`,
          t.end_date as `有效期结束时间`,
          t.updt_time as `医保平台更新时间`,
          t.update_time as `下载时间`,
          t.hilist_lsh as `流水号`
from      t_user_basic_info as t
where     t.is_deleted = 0
          and       t.list_type = '301'
          and       (t.end_date is null or t.end_date >= now())
posted @ 2024-03-05 15:17  JaxYoun  阅读(6)  评论(0编辑  收藏  举报