SQL-Keyword as the processing method of column names

When I was writing Leetcode questions today , it was clear that there was no error in the grammar (as shown below), but I kept making mistakes and I was depressed.

select Score,
dense_rank() over(order by Score desc) as Rank
from Scores;

After thinking about it for a long time, it turns out that keywords need to be quoted as column names.

select Score,
dense_rank() over(order by Score desc) as 'Rank'
from Scores;

Just add quotation marks

Attached Mysql common keywords

Guess you like

Origin blog.csdn.net/weixin_45666566/article/details/114938225