Tag: with clause

你如何使用MySQL中的“WITH”子句?

我将我所有的SQL Server查询转换为MySQL,我的查询中有WITH查询全部失败。 这是一个例子: WITH t1 AS ( SELECT article.*, userinfo.*, category.* FROM question INNER JOIN userinfo ON userinfo.user_userid = article.article_ownerid INNER JOIN category ON article.article_categoryid = category.catid WHERE article.article_isdeleted = 0 ) SELECT t1.* FROM t1 ORDER BY t1.article_date DESC LIMIT 1, 3