写出相应的SQL语句:查询“sell”表中商品编码为“A002”且进货时间为两天前的记录,并按进货时间“datetime”降序排序。
答:select * from sell where 商品编号=‘A002' and datetime <= DATE_SUB(CURDATE(),INTERVAL 1 DAY) oder by datetime desc
写出相应的SQL语句:查询“sell”表中商品编码为“A002”且进货时间为两天前的记录,并按进货时间“datetime”降序排序。
答:select * from sell where 商品编号=‘A002' and datetime <= DATE_SUB(CURDATE(),INTERVAL 1 DAY) oder by datetime desc