Skip to content

Tag: mysql

MYSQL codes not being read

When I input a code or anything into MySQL and hit “enter” it moves down and “->” appears. It is as if the code is not going through or the code is not being read. I have attempted to download “add-ons” but I am really not sure what I am doing. This is for school and I a…

Mysql use 2 functions in 1 query

I’m trying to use 2 same functions in 1 query which is this This uses only the first function and give right result for the first latlngs only. I need the row which is almost near to the 2 latlngs (the latlngs is just example don’t care if it’s wrong <3 ) I want it to Give me the row

combining data from two tables with same primary key

I have a table like this: and another table like this: I want to INSERT the locations into the table1 ON t1.id=t2.id so table1 looks like this: For some reason though, when I run I get a syntax error. Does anyone know how to insert it correctly? Answer Actually you want to update Table1:

single table parent child relationship query

I have written a query to get the items from the table which doesn’t have any child items. It’s working fine but is very slow. Any better/easier/optimized way to write the same thing? Few of the fields are these to get the idea of a structure Query should only return the 4rth item Answer Try below…

How to select the 16 highest values out of 18 values SQL?

Ok so I have changed it from columns to rows instead 😉 Im saving grades for students. I have a MySQL table called “grade” with three columns called “subject”, “points” and “userId” with 18 rows with different subjects where each subject can have one of the value…