CamelCase在SQL中使用snake_case

时间:2015-07-24 12:50:29

标签: mysql sql camelcasing

您知道是否可以将CamelCase中的字段内容转换为snake_case?

像这样:

$ SELECT my_other_field FROM my_table;
+-----------------+
| my_other_field  |
+-----------------+
| ThisIsAnExample |
+-----------------+

$ UPDATE my_table SET my_field = ......(my_other_field);

$ SELECT my_field FROM my_table;
+--------------------+
| my_field           |
+--------------------+
| this_is_an_example |
+--------------------+

0 个答案:

没有答案