Databases Reference
In-Depth Information
Entering SQL Statements
This chapter explains how we can enter our own SQL statements (queries) into
phpMyAdmin, and how we can keep a history of those queries. Traditionally, one
would interact with a MySQL server via the "mysql" command-line client by entering
SQL statements and watching the server's response. Official MySQL training still
involves directly typing statements to such a client.
The SQL query box
phpMyAdmin allows us to accomplish many database operations via its graphical
interface. However, there will be times when we have to rely on SQL query input to
achieve operations that are not directly supported by the interface. Following are two
examples of such queries:
SELECT department, AVG(salary) FROM employees GROUP BY department
HAVING years_experience > 10;
SELECT FROM_DAYS(TO_DAYS(CURDATE()) +30);
To enter such queries, the SQL query box is available from a number of places within
phpMyAdmin.
Search WWH ::




Custom Search