我希望得到用户名表存储在用户列表中的用户的所有特定分数,如下所示:
SELECT Score
from (SELECT tablenameOfUser FROM `Users`)
WHERE X='something'
AND Y='somethingElse'
ORDER BY Score
我收到错误:
1248 - 每个派生表必须有自己的别名
答案 0 :(得分:2)
错误消息说明了一切。您需要在派生表上使用别名。
string fontAdd = @"C:\ETLEngine\Languages\Fonts\BNazanin.ttf";
System.Drawing.Text.PrivateFontCollection privateFonts = new System.Drawing.Text.PrivateFontCollection();
privateFonts.AddFontFile(fontAdd);
var mapFont = new Font(privateFonts.Families[0], 12, FontStyle.Bold);
应该是:
SELECT Score
from (SELECT tablenameOfUser FROM `Users`)
WHERE X='something'
AND Y='somethingElse'
ORDER BY Score
您的子查询只有SELECT Score
from (SELECT tablenameOfUser FROM `Users`) yourAlias
WHERE X='something'
AND Y='somethingElse'
ORDER BY Score
列,因此tablenameOfUser
,Score
和X
将无效,您的查询仍会失败。