Referencias Sql
[pic]
The WHERE Clause
To conditionally select data from a table, a WHERE clause can be added to the SELECT statement.
Syntax|SELECT column FROM table |
|WHERE column operator value|
With the WHERE clause, the following operators can be used:
|Operator |Description|
|= |Equal |
| |Not equal |
|>|Greater than |
|< |Less than |
|>= |Greater than or equal|
|1965 |
|This is wrong:|
|SELECT * FROM Persons WHERE Year>'1965' |[pic]
The LIKE Condition
The LIKE condition is used to specify a search for a pattern in a column.
Syntax
|SELECT column FROM table|
|WHERE column LIKE pattern |
A "%"sign can be used to define wildcards (missing letters in the pattern) both before and after the pattern.
[pic]
Using LIKE
The following SQL statement will return persons with first names that...
Regístrate para leer el documento completo.