Skip to content
Advertisement

Tag: mysql

How to check the query is using the indexes in mysql

I have a SQL query with where clause, I have created the index for the columns which are being used in the where clause. How can I check the query is using the indexes for these columns? Answer Write “explain ” in front of your query. The result will tell you which indexes might be used. For example: You can

Querying MySQL database using Python

I have a table named ‘staff’, with several columns, but the two I’m interested in are ‘username’ and ‘password’. I am trying to create a prompt which asks the user for their username (and later I will do password) and checks the table in the database to see if that username exists. I am a bit clueless about how to

Why would MySQL execute return None?

I am trying to query on a local MySQL database using Python’s (3.4) MySQL module with the following code: As far as I can tell, the connection is successful, the database is composed of several rows but the query always returns the none type. What instances does the MySQL execute function return None? Answer Query executions have no return values.

MySQL error 1093. how to delete from this

Select worked: delete doesn’t work: Error Code: 1093. You can’t specify target table ‘pre_log’ for update in FROM clause 0,001 sec Answer You have specified pre_log table in your sub query from which you actually Delete the records try this might help you..

Advertisement