Where clause | |||||||||||||||||||||||||||||||||
Sometimes you will not want all the rows in a table. Let's say that we only want people whose surname is "Rubble" In order to do this in SQL you must add a WHERE clause. SELECT * FROM PERSONAL WHERE surname="Rubble" The WHERE clause allows us to restrict the results. If the above command was executed then the results would be -
All the basic comparison operators can be used. For example SELECT forename, age FROM PERSONAL WHERE age >=40 Which produces the results -
The operators which you can use are
|