1.拼接(相當(dāng)于sqlserver里面的+號)
select CONCAT(Name,'一條數(shù)據(jù)') from buttons LIMIT 0,1
2.多條數(shù)據(jù)拼接(相當(dāng)于sqlserver里面的FOR?XML?PATH())
select GROUP_CONCAT(Name) from buttons
?3.格式化時(shí)間(相當(dāng)于sqlserver的CONVERT(nvarchar,getdate(),111))
select date_format(now(), '%Y/%m/%d')/*時(shí)分秒:%H:%i:%s*/
?4.參數(shù)化
SqlParameter使用的關(guān)鍵字@
MySqlParameter使用的關(guān)鍵字是?
string sql = "select * from Users where Name like concat('%',?name,'%')"; parameters.Add(new MySqlParameter("?name", "張三"));
本文摘自 :https://www.cnblogs.com/