Clone Clone - 1 year ago 69
SQL Question

SQLlite3 - How do I target a specific value in SQL table?

I have a table

with two columns containing
with type
with a name and
with the type
. My goal is to select a specific value of an element in the first column called lets say
and return the integer that is to the right of it.

My first thought was to use something that looks like this

select points from users where user_name like user4

Should this be accomplished some other way?

Answer Source

Sounds like all you're looking for here is validation. Your SQL statement as written will work fine if you simply add single quotes around user4. The only other thing I would change is to use = in place of like. The like keyword is typically only used when doing a wildcard matching which you are not doing in this case.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download