如何在mysql中替换大写字符?

时间:2018-03-15 23:55:24

标签: mysql sql

在mysql查询中如何将MyTableName等文本转换为MY_TABLE_NAME

1 个答案:

答案 0 :(得分:0)

你可以这样做:

SELECT DISTINCT m.name || '.' || ii.name AS 'indexed-columns'
  FROM sqlite_master AS m,
       pragma_index_list(m.name) AS il,
       pragma_index_info(il.name) AS ii
 WHERE m.type = 'table'
 ORDER BY 1;