Blog Posts on mysql tutorial




Percent:
 
Distinct:
 


MySQL Tutorial – Using BETWEEN condition by INetTutor on Dec 6, 2011Using BETWEEN condition BETWEEN condition is used to retrieve records with in the given range. The syntax of BETWEEN condition: SELECT column_name(s) FROM table_name Where column_name BETWEEN value1 AND value2; Here is our example database table: (em...



MySQL Tutorial – Using HAVING clause by INetTutor on Nov 30, 2011Using HAVING clause HAVING clause is somewhat similar to WHERE clause and it is used together with the GROUP BY clause. It was added to SQL to combine with the aggregate functions because the WHERE clause doesn’t allow aggregates. The syntax of HAV...



PHP-MySQL Lesson: The Where Clause by INetTutor on Nov 22, 2011The Where Clause In this lesson we are going to write PHP scripts that select a specific records in MySQL using the WHERE clause Using WHERE clause we can specify a selection criteria to select, update,delete required records from a table. We can exe...



PHP-MySQL Lesson: Insert records by INetTutor on Nov 15, 2011Insert records In this lesson we are going to write a PHP script that inserts a new record in our database through HTML forms. The INSERT INTO statement in sql is used to insert a record in the database. In PHP, mysql_query() function is used to exec...



MySQL Tutorial – Using Column Aliases by INetTutor on Nov 14, 2011Column Aliases To rename a column in database table, use the AS keyword it allows you to alias the name to different value. The syntax of AS keyword: SELECT column_name(s)AS alias_name FROM table_name AS keyword example: SELECT f_name AS Firstname FR...



MySQL Tutorial – SQL Aggregate Functions by INetTutor on Nov 6, 2011SQL Aggregate Functions (MIN, MAX, SUM, AVG, COUNT) MIN() – returns the minimum value of the selected field. MIN() syntax: SELECT MIN(column_name) FROM table_name; MIN() Example: SELECT MIN(salary) FROM employee_record; It will display the minimum...



PHP-MySQL Lesson: Introduction by INetTutor on Nov 4, 2011PHP-MySQL Lesson: Introduction PHP and MySQL PHP is an open source scripting language used to create dynamic website. MySQL is also an open source relational database system that uses Structured Query Language (SQL). PHP supports variety of databases...



MySQL Tutorial – Limiting Data Retrieval by INetTutor on Nov 2, 2011Limiting Data Retrieval The LIMIT clause is used to limit the records to be displayed in the result set. The syntax of LIMIT clause: SELECT column_name(s) FROM table_name LIMIT startingROW, valueToExtract; Let’s see some example: Here is our databa...



MySQL Tutorial – LIKE Operator by INetTutor on Nov 2, 2011LIKE operator The LIKE operator is used to retrieve records from database table by matching pattern in SELECT SQL statement. The syntax of LIKE operator: SELECT column_name(s) FROM table_name LIKE “value”; Let’s see some example: Here is our da...



MySQL Tutorial – The GROUP BY clause by INetTutor on Oct 26, 2011The GROUP BY clause The GROUP BY clause is used to group similar data specified by a certain field in your table. The GROUP BY clause syntax: SELECT column_name(s) FROM table_name GROUP BY column_name; Let’s see some example of GROUP BY clause: SEL...