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:
What Are NULL Values in MS SQL Server?
Submitted by: AdministratorA NULL value is a special value that represents an unknown value. SQL Server supports NULL values with the following features:
* All data types used for table columns support NULL values. In another word, NULL values can be stored in database tables.
* Individual table columns may be defined to not allow NULL values. In this case, you can not assign NULL values to those columns.
* "NULL" is a keyword that represent a NULL value in expressions.
* NULL values can be used directly in SET (assignment) statements.
* If NULL values are involved in an arithmetic operation, the result will be a numeric NULL.
* If NULL values are involved in a string operation, the result will be a string NULL.
* If NULL values are involved in a datetime operation, the result will be a datetime NULL.
* If NULL values are involved in a bitwise operation, the result will be a binary NULL.
* If NULL values are involved in a comparison operation, the result will be a Boolean NULL.
* If NULL values are involved in a Boolean operation, the result could be TRUE, FALSE, or NULL.
* To test NULL values, you need to use two special operators, IS NULL and IS NOT NULL.
* Special functions are available to handle NULL values, like ISNULL(), and NULLIF()
Submitted by: Administrator
* All data types used for table columns support NULL values. In another word, NULL values can be stored in database tables.
* Individual table columns may be defined to not allow NULL values. In this case, you can not assign NULL values to those columns.
* "NULL" is a keyword that represent a NULL value in expressions.
* NULL values can be used directly in SET (assignment) statements.
* If NULL values are involved in an arithmetic operation, the result will be a numeric NULL.
* If NULL values are involved in a string operation, the result will be a string NULL.
* If NULL values are involved in a datetime operation, the result will be a datetime NULL.
* If NULL values are involved in a bitwise operation, the result will be a binary NULL.
* If NULL values are involved in a comparison operation, the result will be a Boolean NULL.
* If NULL values are involved in a Boolean operation, the result could be TRUE, FALSE, or NULL.
* To test NULL values, you need to use two special operators, IS NULL and IS NOT NULL.
* Special functions are available to handle NULL values, like ISNULL(), and NULLIF()
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.