Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED what is the difference between WQL and SQL query

Status
Not open for further replies.

Harshit Pandey

Well-Known Member
Messages
288
Solutions
8
Reaction score
9
Points
18
Hi, I am trying to understand the diferrence between SQL and WQL query. I know they are not same but which is one is more easy and when to use these ?
 
Solution
WMI provides its own query language that allows you to query managed objects as data providers. WMI Query Language (WQL) is essentially a subset of SQL (Structured Query Language) with minor semantic changes. WQL does have extensions that support WMI events and other features specific to WMI. WQL is the basis for Configuration Manager queries, whereas SQL is used for ConfigMgr reports.
WQL is a subset of SQL, thus everything in WQL is also in SQL. The only real distinctions, from a user perspective, are the keywords. Also note that views are a feature of both SQL and WQL and are not specific to either.
Best Example of this is Configuration Manager collections are based on WQL queries

One important advantage of WQL is that a WQL query can return WMI objects as well as specific properties.
Because management applications such as the Configuration Manager console interact with WMI objects, WQL queries can return result sets that you can use within the ConfigMgr infrastructure.
 
WMI provides its own query language that allows you to query managed objects as data providers. WMI Query Language (WQL) is essentially a subset of SQL (Structured Query Language) with minor semantic changes. WQL does have extensions that support WMI events and other features specific to WMI. WQL is the basis for Configuration Manager queries, whereas SQL is used for ConfigMgr reports.
 
Solution
Status
Not open for further replies.

Forum statistics

Threads
7,130
Messages
27,846
Members
18,145
Latest member
Rothgar
Back
Top