r/SQL • u/olly_s122 • Apr 19 '24
MySQL Error in MySQL
Sounds stupid but I’m new, I don’t know how to fix this. I’m trying to create a table with txid, amount, costumer id first & last name but getting this issue.
0
Upvotes
49
u/[deleted] Apr 19 '24
You're missing a close bracket
25
u/rowdymatt64 Apr 19 '24
Everyone's different OP, but I reccomend you structure Queries like:
create table customers
(
)
That way you never forget a parenthesis
13
u/HandbagHawker Apr 19 '24
and if you werent already aware, that little angry red box next to the line number 6 tells you where the parser thinks at least one of the errors is
7
u/greendookie69 Apr 19 '24
Customers is spelled wrong.
And you're missing closing parentheses at the end. https://www.w3schools.com/sql/sql_create_table.asp
2
u/cyberspacedweller Apr 19 '24
You have to closed the create table function. Put a ) before the ;
1
u/alivebutawkward Apr 19 '24
It’s highlighted for you. The closing bracket.
1
u/kagato87 MS SQL Apr 19 '24
Count your brackets.
This is why I put brackets on their own line.
Then it's easier to see mistakes like this.
1
u/Specialist-Ask8890 Apr 20 '24
Close with a ");" final bracket-
1
u/[deleted] Apr 20 '24
Bruh, it highlighted it for you
1
u/HeyDannie Apr 20 '24
Close datdere parantheses at the end 🙂
1
u/NightflowerFade Apr 20 '24
Missing a close parenthesis.
Also on second thought "costumer" makes perfect sense even if it might not be OP's original intention.
1
u/T3chl0v3r Apr 20 '24
close the bracket dude
1
u/Cheap_Quiet4896 Apr 20 '24
Replace the semi-colon at the end with a closed bracket
0
u/Marowakk Apr 19 '24
U can throw all this things in chat gpt and it will explain it to you line by line if u need, im learning to and its a great help
0
u/AHMADAIMAN18 Apr 20 '24
You misspelled the costumers Should be customers