SQL-J Language Reference,
Page 68 of 118


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

COUNT(*)

COUNT(*) is an aggregate function that counts the number of rows accessed. No NULLs or duplicates are eliminated. COUNT(*) does not operate on an expression.

Syntax

COUNT(*)

The resulting data type is LONGINT.

Example

-- Count the number of rows in the Flights table
SELECT COUNT(*)
FROM Flights
-- Evaluate an expression only if there are
-- rows in the HotelBookings table
SELECT *
FROM HotelAvailability
WHERE EXISTS
   (SELECT COUNT(*)
   FROM HotelBookings)
[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.