- INSERT INTO TABLE1 SELECT * FROM TABLE2 WHERE CONDITION=1 AND CONDITION2=2;
- --获取表格的所有列名
- select COLUMN_NAME from information_schema.columns where table_name='cate_tab';
- --获取schema中所有表名
- select * from information_schema.`TABLES` where TABLE_SCHEMA ='hotelim';
- --拼接字符串
- select concat('public static String ',COLUMN_NAME,'=','"',COLUMN_NAME,'";') from information_schema.columns where table_name='source_tab';
- --该片段来自于http://www.codesnippet.cn/detail/0403201511834.html
来源: http://www.codesnippet.cn/detail/0403201511834.html