MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

DATABASE & SQL/PLSQL

IS NULL and IS NOT NULL keywords & ORDER BY Clause
Previous Home Next

Using IS NULL & IS NOT NULL

In SQL server, NULL is a unknown value means the data is not available. The NULL can be retrieve from the table using IS NULL keyword in the WHERE clause.

Note: NO two NULL values are equal. You can not compare one NULL value to other.

SELECT column_list
FROM table_name
WHERE column_name unknown_value_operator

Where unknown_value_operator is either the keyword IS NULL or IS NOT NULL.

Example:

SELECT *
FROM publishers
WHERE state IS NULL

Returns the all attributes of publisher table where state attribute contain NULL

SELECT *
FROM publishers
WHERE state IS NOT NULL

Returns the all attributes of publisher table where state attribute does not contain NULL

 

Using ORDER BY Clause

It retrieve and display the data in specific order. ASC is the default sort order.

SELECT column_list
FROM table_name
ORDER BY column_name ASC/DESC

Example:

SELECT column_list
FROM table_name
ORDER BY column_name ASC/DESC

Return all attributes of publishers able in order to descending alphabetically order with respect to pub_name attribute

Previous Home Next