常见达梦数据库操作
发布时间:
更新时间:
🕒 阅读时间:1 min read
👀 阅读量:Loading...
查看表结构
selectdistinctutc.COLUMN_ID 排序,ucc.comments as 中文名,utc.column_name as 字段名,concat(utc.data_type,'(',utc.data_length, ')') as 类型,'否' as 主键,'否' as 外键,'' as 备注from user_tab_columns utc,user_col_comments uccwhere utc.column_name = ucc.column_name and utc.Table_Name = ucc.Table_Name
AND utc.TABLE_NAME='PORTAL_FUNCTIONAL_PERMISSIONS' -- 表明AND ucc.owner='PORTAL' -- 模式SCHEMA名order by utc.COLUMN_ID常用函数
-- 1. 时间格式化 时间戳-》YYYY-MM-DD形式FROM_UNIXTIME(create_time/1000,'YYYY-MM-DD hh:mm:ss')
-- 2. json类型字段查询JSON_VALUE(jsonparam, '$.key') -- value为非数组情况JSON_VALUE(jsonparam, '$.key[0]') -- value为数组的情况下select lower(rawtohex(sys_guid())) -- id生成
留言评论