注意在asp.net中传参
string sql="select name,id from user where id=@id"; //@idm不需要引号
MySqlParameter param = newMySqlParameter ("?shop_id", MySqlDbType .VarChar,20);//还是用?
事务:
show variables 'autocommit';
set autocommit=0;
select primary_key_value from tg_sys_majorkey where table_name ='tg_order' and primary_key='order_id';
commit;
select primary_key_value from tg_sys_majorkey where table_name ='tg_order' and primary_key='order_id';
commit;
带参数MySqlParameter 的模糊查询:
wa.consignee like concat('%',?consignee,'%')
注:oracle中使用 || ,sqlserver中使用 + ,mysql中使用concat 连接