sssheng
sssheng

Reputation: 57

Count of result of a sql query based on its return

SELECT [FILE_NO] FROM [MY_FILE] WHERE [FILE_NO] LIKE '%s%';

The result return for the above query is :

LS_01
LS_02
LS_03

i am looking if there is a query that can return a "3" iszit possible?

sorry i ain't good at sql.

Upvotes: 0

Views: 44

Answers (2)

Romesh
Romesh

Reputation: 2274

Hope below query helps

SELECT Count(*) FROM [MY_FILE] WHERE [FILE_NO] LIKE '%s%';

Upvotes: 1

Blorgbeard
Blorgbeard

Reputation: 103555

SELECT count([FILE_NO]) FROM [MY_FILE] WHERE [FILE_NO] LIKE '%s%';

Upvotes: 3

Related Questions