Drupal: Show SQL Query of the View

Working with Drupal views, is amazing isn’t it? Of course, if you have any experience with it. But in my future post, I will explain how to make a view and what is the usage of it in Drupal.

But in this post I am going to share a developer’s tip of the day.

How to preview SQL of the view?

Go to the /admin/structure/views/settings click the checkbox from Show the SQL query.

After you you checked the checkbox, SQL will be displayed in view edit page. In my case I am case I made a new view called “Articles” /admin/structure/views/view/articles

It’s quite useful most of the times, if you need to debug that how data is being fetched.

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk