user2012105
user2012105

Reputation: 55

Query quotes in mysql command

I have a database with a list of heights such as 6'6" in that format, how would I query that?

What I have right which doesn't work

SELECT Height, Weight FROM `students` WHERE Height = (6\'6\") AND Weight >= 200;

Upvotes: 0

Views: 97

Answers (1)

Kasnady
Kasnady

Reputation: 2279

SELECT Height, Weight FROM students WHERE Height = "6'6\"" AND Weight >= 200;

You still need a double quote since they are string

Upvotes: 1

Related Questions