Collections:
Counting Rows with the COUNT(*) Function in SQL Server
How To Count Rows with the COUNT(*) Function in SQL Server?
✍: FYIcenter.com
If you want to count the number of rows, you can use the COUNT(*) function in the SELECT clause. The following tutorial exercise shows you some good examples:
SELECT COUNT(*) FROM fyi_links GO 7 SELECT COUNT(*) FROM fyi_links WHERE url LIKE '%fyi%' GO 3
So there are 7 rows in total in table "fyi_links", and 3 rows that have 'fyi' as part of their url names.
2016-10-26, 1936👍, 0💬
Popular Posts:
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are mu...
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...
What Are Logical/Boolean Operations in SQL Server Transact-SQL? Logical (Boolean) operations are per...
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...