View MySQL có thể dùng kết hợp toán tử logic AND, OR, NOT trong mệnh đề WHERE.
Ví dụ
mysql> Create or Replace View Info AS select ID, Name, Address, Subject FROM Student_info WHERE (Subject = 'Computers' AND ADDRESS = 'Delhi') OR (Subject = 'History' AND Address = 'Amritsar');
Query OK, 0 rows affected (0.11 sec)
mysql> Select * from Info;
+------+-------+---------+-----------+
| ID | Name | Address | Subject |
+------+-------+---------+-----------+
| 133 | Mohan | Delhi | Computers |
+------+-------+---------+-----------+
1 row in set (0.00 sec)
View chỉ trả về hàng thỏa: (Subject=Computers VÀ Address=Delhi) HOẶC (Subject=History VÀ Address=Amritsar).