How do I use the @ sign in Mysql?
A user on SO recently gave me this Query to put into MYSQL, but I don't know what to do with the @ sign.
SELECT user_id, GLength(LineString(utm, @mypoint))
FROM users
WHERE MBRWithin(utm, LineString(Point(X(@mypoint) - 20, Y(@mypoi开发者_JS百科nt - 20)), Point(X(@mypoint) + 20, Y(@mypoint + 20))
AND GLength(LineString(utm, @mypoint)) <= 20
I'm doing everything in console. How would I assign @mypoint?
check out variables here. They're pretty sweet.
It's a variable. This is a legal SQL statement:
DECLARE @mypoint Int = 1;
You can put it before that query and it will insert 1 into every @mypoint. I am not sure what datatype your @mypoint should be, but that's the idea.
精彩评论