Saturday, May 8, 2010

SQL NULL Conditional Queries

0 comments
A special value that represents absence of information.

Examples: 
1. SELECT DEPTNO, DEPTNAME, MGRNO
FROM DEPT
WHERE MGRNO IS NULL
SQL Server
Select top ten emplyees who do not have any manager in SQLSERVER
select top ten emplyees who do not have any manager in mysql2. SELECT TOP 10 *
FRO M EMPLOYEE
WHERE MANGAER IS NOT NULL

                            MYSQL
                           Select top ten emplyees who do not have any manager in mysql
                           2. SELECT  *
                           FROM EMPLOYEE
                           WHERE MANGAER IS NOT NULL
                           limit 10



0 comments: