SQL判断 一个字段为空时,取出另一个字段数据

table = db.exec_sql("""insert into dw.part_subject (
                                part_name,
                                part_type,
                                part_status,
                                reg_date,
                                source_id,
                                source) 
                            select 
                                case when iccard_name is not null then iccard_name else name end,
                                '0',
                                '0',
                                create_datetime,
                                id,
                                '' 
                            from ods.sl_account_560;""")
原文地址:https://www.cnblogs.com/xy-ouyang/p/13027005.html