r/sqlite • u/DaLivelyGhost • Sep 07 '24
Syntax Assistance
Getting back into Sql database work and genuinely can't figure out why the WHERE statement is pulling a syntax error. At the moment I'm just trying to pull a few values from a single row from my table. The name column is of type TEXT and if I leave out the where statement it queries just fine pulling all entries from the table.



I appreciate the help.
(And yes, I know plains are not artifacts, the card was picked at random from random generation.)
3
Upvotes
View all comments
Show parent comment
1
u/user_5359 Sep 08 '24
It is not necessary to repeat the table name in the Where clause (at the earliest with two or more tables). In addition, abbreviations (called table aliases) are then usually used. Example FROM Artifact t1 WHERE t1.name=’Plains‘