1

i have added a connection with a MySQL database in QGIS (Add vector layer - Database - MySQL).

Is there an option to make a query over the database in QGIS?

1

You can achieve this using the DB Manager of QGIS.

You choose Database / Database Manager / Database Manager then Virtual Layers / Qgis Layers. At this stage you should be able to see all the tables opened (MySql, Postgre ...)

You can query these tables like any opened table : just click on the "wrench" icon ("SQL window") - this open an area in which u can edit your SQL query.

You can then load the result in the layer manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.