Monday, 12 February 2018

How to use COUNT() function in SQL Query

COUNT() function return number of records exists in table

COUNT() Syntax

SELECT COUNT(ColumnName or *) FROM YourTableName

Example

SELECT COUNT(ID) FROM City

Introduction of SQL

What is SQL ?

- SQL Stand for Structured query language
- SQL is an ANSI standard

What SQL can do ?

- SQL execute query
- SQL select data
- SQL Store data
- SQL Modify data
- SQL Delete data
- SQL create procedure
- SQL create view
- SQL create table
- SQL create functionc