Sollicitatievraag bij eClinicalWorks

What is the difference between having and where clause in SQL? What is Indexing in SQL?

Antwoord op sollicitatievraag

Anoniem

22 okt 2017

1) The WHERE clause is used to filer rows from a results. For instance SELECT COUNT(SalesOrderID) FROM Sales.SalesOrderDetail 2) The HAVING clause is used to filter values in a GROUP BY. You can use them to filter out groups such as SELECT SalesOrderID, SUM(UnitPrice * OrderQty) AS TotalPrice FROM Sales.SalesOrderDetail GROUP BY SalesOrderID HAVING SalesOrderID > 50000

2