Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Databases Programming Interviews:BtrieveClipperData ModelingData StructuresDatabase AdministrationDatabase Administrator (DBA)Database AnalystDatabase DeveloperDB DevelopmentEDI/Data Integration ExpertFirebirdHierarchicalIBM DB2InformixJava DatabaseMariaDBMicrosoft Access DeveloperMongoDBMS SQL ServerMySQL ProgrammingNetworkNoSQLObject RelationalPostgrePostgreSQLProgressRDBMSRelationalSQLSQL AdministratorSQL and PL/SQLSQL Notification ServicesSQL server 2008SSRSStored ProcedureSybaseTeradata
Copyright © 2018. All Rights Reserved
MS SQL Server Interview Question:
How To Count Rows with the COUNT(*) Function in MS SQL Server?
Submitted by: AdministratorIf 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 ggl_links
GO
7
SELECT COUNT(*) FROM ggl_links
WHERE url LIKE '%glo%'
GO
3
So there are 7 rows in total in table "ggl_links", and 3 rows that have 'glo' as part of their url names.
Submitted by: Administrator
SELECT COUNT(*) FROM ggl_links
GO
7
SELECT COUNT(*) FROM ggl_links
WHERE url LIKE '%glo%'
GO
3
So there are 7 rows in total in table "ggl_links", and 3 rows that have 'glo' as part of their url names.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.