Can someone please tell me what I am doing wrong, I am beyond frustrated


Error: near line 1: near "*": syntax error

SELECT (*) FROM bakeries LIMIT 10;

Replace this line with your code.


why do you use parentheses around *? You shouldn't, it causes the error


thank you, how am I supposed to know when to use it or not?


That is why you do the course? To learn how and when to use them. My sql knowledge isn't that good, I just knew you shouldn't use them like you did here.


Hi Williammunny1870,

Basically what you did is a common error when learning SQL.

What you have to know is that the parenthesis are generally used with functions to precise the argument of the function (i.e SELECT COUNT (*) FROM table ; will count the number of data/rows that you have in your table).

Hope this helps you avoid the confusion :wink:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.