MySQL Examples, Learn MySQL with examples.
This tutorial is discussing many examples of MySQL.Mysql Switch Case perform one of several different actions based on several different conditions.
This tutorial is discussing many examples of MySQL.Mysql Switch Case perform one of several different actions based on several different conditions.
MySQL Example

In this section you will find the SQL examples using MySQL Database Server.
These MySQL example SQL's tutorial is very useful in learning the concept of
SQL. You will learn how to use the different types of SQL Statements for
managing you data. Few examples are also developed using the PHP scripting
tool. You can use PHP to connect to MySQL Database and fetch the data stored in
table(s).
MySQL is one of the most used Databse server for storing the data. Aapache,
PHP and MySQL is the best combination for creating the dynamic web applications
for Internet.
Wordpress is one of the most used blogging and content management tool used
for running the website is also based on PHP and MySQL.
Here are the example of MySQL which explains you the SQL concepts in depth:
- Mysql Switch CASE
Mysql Switch Case perform one of several different actions based on several
different conditions.
- Mysql Check
Mysql Check is used to check the existence of table in the database.
- Mysql Decimal Datatype
Mysql Decimal Datatype is used to specify the numeric values.
- Mysql Describe
Mysql Describe is used to describe the table Field,Type,Null etc attribute.
- Mysql Else Condition
Mysql Else Condition evaluate the statements in database to perform different
actions based on different conditions.
- Mysql Exists
The Tutorial covers on 'Mysql Exists'. The section helps you to understand an
example from 'Mysql Exists'.
- Mysql For Loop
Mysql For Loop are used to execute the block of code to a specified number of
times till the specified condition is true.
- FROM
Mysql From specify the table from which records is retrieved.
- PHP SQL IF Statement
This example illustrates how to use the 'if' statement in PHP when
accessing the data from table in mysql database.
- Mysql Insert
Mysql Insert is used to insert the records or rows to the table.
- PHP SQL Query Insert
This example illustrates how to execute insert query
in PHP application.
- PHP SQL LIKE Operator
This example illustrates how to use the like operator in sql query.
- PHP SQL Login
This Application illustrates how to create a login page where only authorized user can login and
process further.
- MySQL Coalesce
In this section, you will learn about MySQL Coalesce. It
selects the first non-null value of its arguments.
- MySQL Connection String
This section gives you brief description of MySQL
connection string.
- MySQL Cursor
Here we are going to describe about the MySQL cursor and
how to declare, open, fetch and close it. Cursor can be created inside the
stored procedures, functions and triggers.
- Mysql Alter Allow Null
Mysql Alter Allow Null is used to change the Null Type
of a column in a table. The Allow Null allows the null type
characteristics in a column of the table.
- Mysql Difference
Mysql Difference is used to return the records that are the outcome of
difference between the records in a table.
- Mysql Group By
Mysql Group By statement is conjecture term used with the aggregate functions
to group the result-set by specified one or more columns.
- Mysql Last
Mysql Last is used TO limit Mysql query result that fall in a specified
range. The Query is used to show the first X number of results and show a range
from X-Y results.
- Mysql last record
Mysql Last Record is used to return the last records from table
'employee1'.
- Mysql last row
Mysql Last Row is used to return the last records from table.
- Mysql left
Mysql Left is used to return the Left String character from a
String.
- Mysql Left Function
Mysql Left Function is used to return the leftmost string character from the
string.
- Mysql String Length
Mysql Length is used to return the length of the String.
- Mysql Length Function
The Tutorial already illustrate you an example to find the length
of the String. Now this section of tutorial helps you to find the
Length Function in Mysql.
- Mysql Like Operator
Mysql Like is used to retrieve the records on the basis of pattern matching
in select query. The like comparison Operator in SQL allows you to match any
single character or any arbitrary character enclosed in a single quotes.
- Mysql Like Command
Mysql Like Command is used for retrieving the records from a table on the
basis of pattern matching.
- Mysql Like Operator
Mysql Like Operator is used to compare a part of string using the % wild card
character.
- Mysql like syntax
Mysql Like is used to retrieve the records on the basis of pattern matching
in select query.
- Mysql Limit
Mysql Limit is used to limit your query result to those which fall within a
specified range.
- Mysql List
Mysql List elaborate you an Query for listing databases, tables,
Procedure, columns, usernames and its password.
- Mysql List Tables
The Tutorial illustrate an example from 'Mysql List Tables'. To
understand this example we use show tables query that return the list of
tables in database name 'Table_in_girish'.
- Mysql Loader Control File
Mysql Loader Control File is the mean to import a data to a plain
text from Mysql database.
- Mysql Loader Examples
Mysql Loader Example is used to create the backup of data file and then
import the data text file into Mysql database.
- Mysql Loader Tutorial
Mysql Loaded Tutorial is used to import a data to a plain text from Mysql
database.
- Mysql Loop in Procedure
Loop in Procedure is a simple loop construct that enables an repeated
execution of the statement list, which consists of one or more statements.
- Mysql Looping
Looping in Mysql is a simple loop construct, that enables the repeated
execution of the statement list.
- Mysql Lower Case
Mysql Lower Case is used to convert the Upper Case letter to the Lower Case.
- Mysql Lpad
Mysql Lpad is used to add the padding to the left end of the
string. The Mysql
Padding function will be stooped if the combination of string and the added
padding reach length character.
- Mysql Lpad Function
Mysql Lpad Function is used to add padding to the left end of the
string. The
Function stopped the combination of string and added padding if it reached the
length character.
- Mysql Ltrim
Mysql Ltrim is used to remove the left leading and trailing spaces in the
string.
- Mysql Math Function
Math Function involved in Mysql when we perform some operation on
mathematical operator.
- Mysql Merge
Mysql Merge Statement is used to merge the two sql statement using UNION
clause. The UNION clause is used to combine the result set of any two sql
queries.
- Mysql Merge Statement
Mysql Merge Statement is used to merge the two sql statement using UNION
clause.The UNION clause is used to combine the result set of any two sql
queries.
- Mysql MidString
Mysql MidString is used to return the string, with sub string beginning at
position pos and len.
- Mysql Minimum Query
Mysql Minimum Query is useful when you want to return the minimum value
record from table.
- Mysql Minus
Mysql Minus is used to see only those records from table which are not in
another table.
- Mysql Mod Function
Mysql Mod Function is used to return the remainder of N divided by
M.
- Mysql Multiple Date Insert
Mysql Multiple Column Insert is used to add or insert multiple data to the
table.
- Mysql Multiplication Columns
Mysql Multiplication Columns is used to provide the column that is the
outcome product of all the records in the respective columns of a table.
- Mysql Multiply
Mysql Multiply is used to define the product of any two or more numbers in a
table.
- MySQL random
In MySQL we can get the random records by using the method
RAND() of MySQL. There are two versions of RAND() function : first RAND()
and second is RAND(X).
- MySQL random number
You may fall in the condition when you want to create random number for your
program to process some logic, here is the solution for such condition.
- MySQL random order
In MySQL we can get the rows records in a random order by using the method
RAND() of MySQL. In the following example, we will describe how you can
use RAND() function to fetch records from the database.
- MySQL range
May times the programmer needs to find out some specific data which lies in
the particular range of values but there is not any predefined function in MySQL.
- MySQL rank
Many times there is a need to rank the records according to some specific
field values but there is not any specific method provided in the MySQL
to rank the records.
- MySQL Round
ROUND() function of MySQL rounds the number to the upwards or
downwards to the nearest whole number or to the specified decimal places. For
getting the whole rounded number ROUND() function uses "round
half up".
- Mysql where
Mysql Where returns only those records from table which are
specified in the WHERE Clause.
- Mysql As
Mysql As is used to specify the another name for the existing column and
table name.The Alias Name is helpful for database that makes it easy to write
and read.
- MySQL by
In the following example you will see the how to use the MySQL by.
Here, we will use GROUP BY clause. It displays the data in the group of employee
salary.
- MySQL Case
If you want to implement a complex conditional construction
then you can use MySQL case statement. It performs the work as programming type.
- MySQL Cast
Here, you will learn about the MySQL CAST() function.
- MySQL Commands
In this section, we are going to read about the mysql commands. Each
statement is sent to the server for the execution by MySQL. MySQL provides lots
of commands.
- MySQL Case In Where Clause
If you want to implement a complex conditional
construction then you can use MySQL case statement. It performs the work as
programming type.
- MySQL Case Sensitive
Here we are going to read about the MySQL case sensitivity. The case sensitive
is a term that tells you to check lettercase either upper case or lower
case.
- MySQL Convert
This section describes about the MySQL convert. It provides a way for converting
the data of one type to another type.
- MySQL Count
This example illustrates how to use count() in MySQL database.
- Mysql Create Table
Mysql Create Table is used to create a table in database.
- Mysql Current TimeStamp
Mysql Current Timse Stamp is used to show the current time and current date
in your database.
- Mysql Declare Procedure
Mysql Declare Procedure is used to define a local variable within a
procedure. The local variable are used within the procedure.
- Mysql From Table
Mysql From Table is used to specify the table from which the records is
retrieved.
- MySQL Order By
Here, you will learn how to use MySQL Order By clause. The Order By clause is used for sorting the data either
ascending or descending order accordi
Ads