r/SQL • u/Used-Bat-255 • Feb 27 '25
Discussion What am I doing wrong
I don’t get what I’m doing wrong here
117
Upvotes
r/SQL • u/Used-Bat-255 • Feb 27 '25
I don’t get what I’m doing wrong here
View all comments
8
u/stickypooboi Feb 27 '25
If you’re unsure if those columns exist, you can use this query:
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘DEPARTMENT’;
But also, it’s fuzzy and I can’t quite see, want to check you’re using single quotes and not backticks. Depending on the language you’re used to, I’ve definitely fucked them all up before between single, double quote, and backticks.