Académique Documents
Professionnel Documents
Culture Documents
For
example,
SELECT StdName
SELECT StudentID
FROM Student
AND: Narrows down the query even further. Records that match both statements are
only displayed.
For example, find the address of the student whose name is John Smith and whose
major is economics
SELECT StdAddress
FROM Student
OR: Narrows down the query even further. In this case records that match any one
of the statements is displayed. Find the student whose names are either john smith
or adam smith.
SELECT StdAddress
FROM Student
Select StdName
FROM Student
LIKE
LOGICAL OPERATORS <, >, >=, <=, <>, =: Used for mathematical operations
1. SQL is not case sensitive. Do not worry about upper or lower cases as long as
you have the spaces placed correctly
2. One common mistake while running SQL Query is misspelling the field name,
table name or criteria specification. Be sure to look into the tables and fields
before entering or running the query.
3. Always start a new statement from a new line, that is, click enter after
completing each query statement like, SELECT, FROM, WHERE.