Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的语法:
select firstname from (select * from inquiry where id = 2 ) as inner ;
我对将表的别名放在哪里感到困惑。我使用了上面的语法,但它会导致错误:
你的 sta 有错误......
INNER是 MySQL 的保留关键字,如果您尝试将其用作别名,则会引发错误。
INNER
要么在单词“inner”周围放置反引号(`),要么只使用不同的别名:
SELECT a.firstname FROM (SELECT * FROM inquiry WHERE id = 2) a