.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

Will COUNT(column) include columns with null values in its count?

Posted By :Narayanan     Posted Date :August 29, 2011    Points :40   Category :Sql Server 
Yes

You can also find related Interview Question to Will COUNT(column) include columns with null values in its count?  below: 

Will COUNT(column) include columns with null values in its count?

  
Yes, COUNT(column) include columns with null values in its count? (More...)

How to get the column count of a report?

  
SY-LINSZ system variable gives the column count (line size) and SY-LINCT for line count. (More...)

What is COUNT Syntax?

  
SELECT COUNT("EMPLOYEE_NAME") FROM "EMPLOYEE_TABLE";
or
SELECT COUNT(*) FROM "EMPLOYEE_TABLE";


COUNT is arithmetic function, This is return number of row. (More...)

COUNT and DISTINCT Syntax?

  
SELECT COUNT(DISTINCT EMPLOYEE_NAME) FROM EMPLOYEE_TABLE;

Fetch the number of distinct entries in a Employee_table. (More...)

Can you control concatenation of string values with null values?

  
Concatenation of string values with null values results either null value or string value.
We can control that by setting CONCAT_NULL_YIELDS_NULL on or off.
When it is set to ON, the concatenation will result null and when it is set to OFF, it will result the string.
Setting it ON,
SET CONCAT_NULL_YIELDS_NULL on;
print 'testing' + NULL; --results NULL and prints nothing

Setting it OFF,

SET CONCAT_NULL_YIELDS_NULL off;
print 'testing' + NULL; -- results testing and prints the same (More...)

You have a column that will only contain values from 0 to 256. What's the most economical data type to use for the column?

A. TINYINT
B. SMALLINT
C. INT
D. DECIMAL(3)
E. VARCHAR(3)


  
Correct Answer : B
Explanation:-
------------
A SMALLINT data type uses only 2 bytes of data and can store value from -32,768 to 32,767. A TINYINT data type cannot be used because the maximum value it can hold is 255. Although an INT data type can be used, SMALLINT will use only 2 bytes compared to INT's 4 bytes. VARCHAR(3) will use 3 bytes while DECIMAL(3) will use 5 bytes.
(More...)

how to get records count by hourly wise?

  
SELECT Count (*), to_char(col_datetime,'yyyymmdd HH24') FROM tblname where Trunc(col_datetime) =Trunc(SYSDATE-1) group by to_char(col_datetime,'yyyymmdd HH24')
(More...)

Using query analyzer, name 3 ways to get an accurate count of the number of records in a table?

  
SELECT * FROM table1
SELECT COUNT(*) FROM table1
SELECT rows FROM sysindexes WHERE id = OBJECT_ID(table1) AND indid < 2 (More...)

Which command is use to convert column values into column name?

  
Pivot table is use to convert column values into column name. It can be use to rotate the table. (More...)

Steps to Get Visitors Count in ASP.NET?

  
Create Global.asax File:

Inside the void Application_Start()
Enter code as

Application["VC"]=0;

and Then Enter the Code inside the Session_Start()
as

Application["VC"]=Convert.ToInt32(Application["VC"])+1;


(More...)

How to hide column/columns of silverlight/WPF datagrid?

  
If you want to hide column or columns in datagrid in code behind then do the following steps:

dgSample.Columns[0].Visibility = Visibility.Hidden;

Note: Rename dgSample to your datagrid name.
(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend