This SQL statement creates or replaces a view named "user_info" in the "icdc_to_tsgl" schema. The view is created by selecting specific columns from the "sys_uicm_user" table and applying some transformations. The selected columns are: "card_id", "id_number", "user_name", "unit_uid", "unit_name", "id_type", "card_type", "birthday", "mobile", "is_active", "begin_time", and "end_time". Additionally, a column named "photo_path" is created using the "decode" function, which checks the value of the "id_type" column and returns a corresponding value based on the condition. The view is used to provide user information to the "tsgl" system

create or replace view icdc_to_tsgluser_info asselect suucard_id as dzzh suuid_number as dlmc suuuser_name as dzxm suuunit_uid as bmbh suuunit_name as bmmc suuid_typ

原文地址: https://www.cveoy.top/t/topic/dbOC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录