SQL HAVING clause ditambahkan ke SQL karena kata kunci WHERE tidak dapat digunakan dengan aggregate functions.
Format:
SELECT namakolom1, aggregate_function(namakolom2)
FROM namatabel
WHERE namakolom1 operator nilaikolom1
GROUP BY namakolom1
HAVING aggregate_function(namakolom2) operator nilaikolom2
Contoh penggunaan:
SELECT kodesub, avg(hargajual) as ratarata FROM produk group by kodesub having avg(hargajual) > 30000
- Home
- Tutorial Bahasa Indonesia
- _Visual Basic 6 (VB6)
- __VB6 Basic & General
- __VB6 MySQL
- _Visual Basic .NET
- __VB.NET Basic & General
- __VB.NET Ms Access
- __VB.NET MySQL
- __VB.NET Printing
- _ASP.NET
- _C#
- _PHP
- _Flutter
- _MySQL
- _SQL Server
- _SQL Reporting (SSRS)
- English Tutorial
- Youtube Channel
- About Me
- _About Me and This Blog
- _Stories Of Life
- _Portofolio
0 Comments