用MSSQL 是这么写的,
例如:select top 2 ID,GoodsName,price,nowprice,picture from tb_goods where sale=1 order by INTime desc但是用MYSQL怎么写呢?还有个问题MYSQL里有没有类似MSSQL里的money类型?
谢谢大侠们!!!
例如:select top 2 ID,GoodsName,price,nowprice,picture from tb_goods where sale=1 order by INTime desc但是用MYSQL怎么写呢?还有个问题MYSQL里有没有类似MSSQL里的money类型?
谢谢大侠们!!!
select top 2 ID,GoodsName,price,nowprice,picture from tb_goods where sale=1 order by INTime desc
==〉select ID,GoodsName,price,nowprice,picture from tb_goods where sale=1 order by INTime desc limit 2;MONEY类型在MYSQL中可以用两步:
1、用DECIMAL类型,
2、用FORMAT函数显示。比如
select format(2000000.5222,3);
----------
select ID,GoodsName,price,nowprice,picture from tb_goods where sale=1 order by INTime desc limit 2;