Oracle Tutorial

NOT Examples

Example 1

Select *
From users_log u
Where u.log_date NOT Between '01-SEP-2011' And '30-SEP-2011';

Example 2

Select *
From books b
Where b.book_id NOT Between 200 and 400;

Example 3

Select *
From books b
Where b.book_name NOT Like = '%JAVA%';



Example 4

Select *
From students
Where email IS NOT NULL;

Example 5

Select *
From books
Where book_id NOT IN (Select book_id From sales );

Example 6

Select *
From books
Where NOT EXISTS
(Select *
From sales s
Where b.book_id = s.book_id);

Example 7

Select *
From cities
Where city <> 'LONDON';