常用sql语句

选择

select t.column_name from user_col_comments t where t.table_name = 'LATELYGPSINFO';

存在更新,不存在插入

// mysql 已验证
sql = str::cstr::format("replace into %s (f_no,f_name) values (%I64d,'%s')",
it.tableName.c_str(), itJson[paramKey.c_str()].asInt64(),
itJson["name"].asString().c_str());

插入

string sql = "insert into t_province (f_no,f_name) values (?,?)";

更新

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

删除

DELETE FROM 表名称 WHERE 列名称 =

创建表