首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

求sqlserver改写成mysql语句解决办法

2012-04-26 
求sqlserver改写成mysql语句Java code//这个是求pddate与系统时间的天数差selectbookId,bookName,booktype

求sqlserver改写成mysql语句

Java code
//这个是求pddate与系统时间的天数差select         bookId,bookName,booktypeId,pbName,author,        context,smallImg,bigImg,price,pbdate,        bookStates,    ygcprice ,numfrom bookInfo where num<10 and Datediff(Day, pbdate, Getdate()) >= 15 order by pbdate ,num ascselect  top 5        bookId,bookName,booktypeId,pbName,author,        context,smallImg,bigImg,price,pbdate,        bookStates,    ygcprice ,numfrom bookInfo  where bookStates <> 4 and  booktypeId <> 0and        bookId not in    (select top 0     bookId from bookInfo  where bookStates <> 4 and  booktypeId <> 0    )select  top 2        bookId,bookName,booktypeId,pbName,author,        context,smallImg,bigImg,price,pbdate,        bookStates,    ygcprice ,numfrom bookInfo  where bookStates  = 2 and  booktypeId  = 21and        bookId not in    (select top 0     bookId from bookInfo  where bookStates  = 2 and  booktypeId  = 21    )


[解决办法]
建议去mysql版块问

热点排行