Posts

Showing posts with the label SQL

MySQL in Short

Image
NOTES : Remember to put a semicolon at the end of your SQL statements. The ; indicates that your SQL statment is complete and is ready to be interpreted. Strings must be in single quotes. The percent sign "%" can be used as a wild card to match any possible character that might appear before or after the characters specified.     ACTION QUERY Match any first names that start with ' Er ' SELECT  first, last, city   FROM  empinfo WHERE  first LIKE 'Er%'; Match any last names that end in a ' s ' SELECT first, last FROM empinfo WHERE last LIKE '%s'; Select rows where the first name equals ' Eric ' exactly SELECT *  FROM empinfo WHERE first = 'Eric'; Select last name, city, age from table whose age is greater than 30. SELECT last, city, age  FROM empinfo WHERE age > 30; Select first name, last name, age whos elast name consists of “ illia ”. SELECT fi...