Reputation: 122
In MySQL Workbench, there are a lot of built-in functions for performing different tasks. Some functions are just synonyms. But I notice that synonymous functions sometimes have different color representations. Like, curdate() is grey and current_date() is blue. The documentation says that they are synonyms. So is there any specific reason behind the color codes here?
Upvotes: 2
Views: 742
Reputation:
The blue means the word has meaning without parentheses.
SELECT CURRENT_DATE; -- '2021-10-24'
If you try the same with CURDATE it will fail without parentheses.
I came across the same behavior when calling the string function REPLACE. Here we can't call REPLACE without parentheses, but it is used in the REPLACE INTO statement.
Upvotes: 2