- 根据表名查sd_id
mysql> select sd_id,tbl_name from tbls where tbl_name='s_member_core_customer_i';
+--------+--------------------------+
| sd_id | tbl_name |
+--------+--------------------------+
| 111921 | s_member_core_customer_i |
+--------+--------------------------+
1 row in set (0.00 sec)
- 根据sd_id查cd_id
mysql> select cd_id,sd_id from sds where sd_id='111921';
+-------+--------+
| cd_id | sd_id |
+-------+--------+
| 35017 | 111921 |
+-------+--------+
- 根据cd_id即可查出注解字段
mysql> select * from columns_v2 where cd_id='35017';
+-------+---------------------------------------------------------------------------------------------------+----------------+-----------+-------------+
| CD_ID | COMMENT | COLUMN_NAME | TYPE_NAME | INTEGER_IDX |
+-------+---------------------------------------------------------------------------------------------------+----------------+-----------+-------------+
| 35017 | notinuse/????(PERSON_CERTIFY????,IMPORT_PERSON_BATCH_REGISTER??????????,OTHER_ORG_REGISTER?????) | cert_from | string | 4 |
| 35017 | kyclevel-10/0/10/20/30/?????-10/0/10/20/30 | certify_info | string | 2 |
| 35017 | VerificationStatus:C:Verified,N:NotVerified,U:InProgress/????(C????,N???,U?????) | certify_status | string | 3 |
| 35017 | Createtime/???? | created_date | string | 7 |
| 35017 | uniquekey/??id | customer_id | string | 1 |
| 35017 | Deleteornot:Deleteornot:0:No,1:Yes(whenusingthetableshouldfilterwheredelete_status=0)/????(0?,1?) | delete_status | int | 9 |
| 35017 | OperationStatus:N:Normal,F:Frozen,W:Inactive,C:Delete/?????(N??,F??,W???,C??) | enable_status | string | 6 |
| 35017 | autogeneratedkey(runningnumber)/?? | id | int | 0 |
| 35017 | Updatetime/???? | modified_date | string | 8 |
| 35017 | notinuse/??????(T?,F??) | sub_user_flag | string | 5 |
+-------+---------------------------------------------------------------------------------------------------+----------------+-----------+-------------+