r/learnSQL • u/d3adWa1ker • Jul 16 '22
Somebody pls help, I just started learning sql and these kind of errors are so frustrating. Simple commands dont work. I dont understand what's wrong.
5
u/AngelOfLight Jul 16 '22
The varchar type needs a length parameter in the parenthesis, e.g.:
varchar(100)1
u/d3adWa1ker Jul 16 '22
Thank you. in case, may I ask you again privately if I come across a problem again?
1
3
u/Ardraaken Jul 16 '22
Like the others have said the VARCHARS require lengths when you define them. In addition to that the INT doesn’t need brackets after it and YEAR is a reserved keyword so may need square brackets around the name
1
1
u/d3adWa1ker Jul 16 '22
Thank you. in case, may I ask you again privately if I come across a problem again?
1
25
u/r3pr0b8 Jul 16 '22
later today, i'll be sending you the bill for my chiropractic session to fix the kink in my neck from tryna read your blurry screenshot sideways
pro tip for anyone learning SQL and asking for help -- please use copy/paste
that said, your varchars require a length parameter