Fungsi MS Access Round()
Contoh
Bulatkan kolom Harga menjadi 1 desimal di tabel "Produk":
SELECT ProductName, Price, Round(Price, 1) AS RoundedPrice
FROM Products;
Definisi dan Penggunaan
Fungsi Round() membulatkan angka ke sejumlah tempat desimal yang ditentukan.
Catatan: Jika ekspresi diakhiri dengan 5, fungsi ini akan dibulatkan sehingga digit terakhir adalah bilangan genap. Berikut beberapa contohnya:
Putaran(34.55, 1) - Hasil: 34.6 (pembulatan ke atas)
Putaran(34.65, 1) - Hasil: 34.6 (pembulatan ke bawah)
Sintaksis
Round(expression, decimal_places)
Nilai Parameter
Parameter | Description |
---|---|
expression | Required. A numeric expression to be rounded |
decimal_places | Optional. The number of decimal places to round the expression to. If omitted, the function rounds to the nearest whole number |
Detail Teknis
Bekerja di: | Dari Akses 2000 |
---|