Blog Archives

In this section, you’ll be getting started with MySQL.You will learn how to use MySQL effectively to get your work done more productively. You will also learn how to manage databases, insert data into database tables and get data back by using various SQL queries.

Getting previous day/month/year records from mysql table

In this post will explain how to get Today, yesterday, last one month record, last year record from database table using Mysql query. Here I have used the MySQL function CURDATE() to get the today’s date. And also to get

Posted in MySQL

MySQL Order By

The way to order your result in MySQL is to use the ORDER BY statement. The ORDER BY keyword is used to sort the result-set by a specified column. You can sort the results by any field in an ascending

Posted in MySQL

MySQL DISTINCT

Assume in a table, some of the columns may contain duplicate values. This is not a problem; however, sometimes you will want to list only the different (distinct) values in a table. DISTINCT helps to eliminate duplicates. If a query

Posted in MySQL

MySQL Delete

The DELETE statement is used to delete records in a table. If you want to delete a record from any MySQL table then you can use SQL command DELETE. Syntax: DELETE FROM table_name WHERE Clause condition If WHERE clause is

Posted in MySQL

MySQL Update

The UPDATE statement is used to update records in a table. There may be a requirement where existing data in a MySQL table need to be modified. You can do so by using SQL UPDATE command. This will modify any

Posted in MySQL

MySQL AND & OR

The AND operator displays a record if both the first condition and the second condition is true. The OR operator displays a record if either the first condition or the second condition is true. Example for AND : Now we

Posted in MySQL

MySQL Where

We have seen MySQL SELECT command to fetch data from MySQL table. We can use a conditional clause called WHERE clause to filter out results. Using WHERE clause we can specify a selection criteria to select required records from a

Posted in MySQL

MySQL Insert

The INSERT statement is used to insert new records in a table. Syntax: It is possible to write the INSERT statement in two forms. The first form doesn’t specify the column names where the data will be inserted, only their

Posted in MySQL

MySQL Select

SELECT, which is used to get information from the database, so that its data can be used in our PHP script. Syntax: SELECT * FROM table_name; and SELECT column_name(s) FROM table_name Note: SQL is not case sensitive. SELECT is the

Posted in MySQL

MySQL Tutorial

  MySQL is currently the most popular open source database server in existence. On top of that, it is very commonly used in conjunction with PHP scripts to create powerful and dynamic server-side applications. As the world’s most popular open

Posted in MySQL