select table_name,table_comment from information_schema.TABLES where table_schema = '%s' and table_name in (%s)
二、获取视图DDL
SELECT * FROM information_schema.views WHERE TABLE_NAME = '%s' and TABLE_SCHEMA = '%s'
三、判断表是否存在sql
select table_name from information_schema.TABLES where table_name = '%s' and table_schema = '%s'
四、字段详情查询
select table_name,column_name,ordinal_position,column_default,EXTRA,is_nullable,data_type,column_comment,column_key,numeric_precision,numeric_scale,character_maximum_length from information_schema.columns where table_name in ('%s') and table_schema = '%s'
五、查询当前用户是否存在
select host,user form mysql.user where user = '%s'
六、查询库列表
SELECT schema_name SCHEMA_NAME FROM information_schema.schemata
七、查询表列表
select table_name,table_comment from information_schema.TABLES where table_schema = '%s' and table_type = '%s'
八、查询用户对某表所拥有的权限
select Table_priv from `mysql`.`tables_priv` where Host in ('%', '%s') and DB = '%s' and User='%s' and Table_name = '%s'
九、查询分区信息
select * from information_schema.PARTITIONS where table_name in (%s) and table_schema = '%s' ORDER BY TABLE_NAME ASC,PARTITION_ORDINAL_POSITION ASC
算法对比: 使用方法:
SELECT town,max(price) AS max_price,any(population) AS population
FROM uk_xxx_paid
JOIN uk_xxx_table
ON lower(uk_price_paid.town) lower(uk_populations_table.city)
GROUP BY town
ORDER BY max_price DESC
SETTINGS jo…
一.初始化列表
1.引入
我们知道在c11中才能在成员对象声明时初始化,像下面这样。
class Date
{
public:
Date(int year, int month, int day): _year(year), _month(month), _day(day)
{}
private:
int _year2000;
int _month12;
int _day20;
};注意:…
一、关于史密斯数的传说 1、关于理海大学Lehigh University
理海大学(Lehigh University),位于宾夕法尼亚州(Pennsylvania)伯利恒(Bethlehem),由富有爱国情怀与民族精神的实业家艾萨…