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


#1


https://www.codecademy.com/en/courses/sql-table-transformation/lessons/date-number-string-functions/exercises/date-number-string-functions?action=lesson_resume&link_content_target=interstitial_lesson


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

SELECT (*) FROM bakeries LIMIT 10;


Replace this line with your code.


#2

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


#3

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


#4

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.


#5

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:


#6

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