Mysql Example

- 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 according to user requirement.
- PHP SQL Number of Rows
To understand how to count the number of rows in a table, we have created a sql_num_rows.PHP file.
- PHP SQL num rows
In this example, we have created a num_rows.PHP file in which we executed a query
to find the number of rows in the table.
- PHP SQL Paging OR Pagination
Some times the programmer needs to display a large amount of data. Displaying
all data in one page in not a good idea. For this situation, pagination is the
solution.
- PHP SQL Login Script
In this example, we have created a login application where we will use
PHP script for
validation. If the user does not fill the user name or password then the error
message is displayed in the next page.
- SQL Bulk Insert
SQL Bulk Insert is performed when you insert a records or row to a
table in a bulk.
- SQL Bulk Insert csv
SQL Bulk Insert is used to import the records from csv file to the same
format table in a Mysql database.
- SQL Max Count
SQL Max Count is used to return the maximum records value of the specified
column in a table.
- Mysql ASC Order
Mysql ASC Order is used to sort the result set by ascending or descending
order. The Order by CLAUSE sort the result by specified column.
- PHP SQL Query Where Clause
To understand how to display the result returned
from the sql query execution, we have created whereClause.PHP page.
- PHP SQL Result
This example illustrates how to display result on
the browser and how to use the result in the PHP application.
- PHP SQL ORDER BY
This example illustrates how to execute query with ORDER BY clause
in the PHP application.
- PHP SQL ODBC
This example illustrates how to create an ODBC Connection for PHP application.
- PHP SQL Max
This example illustrates how to use max() function in sql.
- PHP SQL Limit
This example illustrates how to execute LIMIT operator of mysql in
PHP.
- PHP SQL Injection Example
Database is the main part of any application used to store the sensitive
information like user credentials, financial information etc. SQL Injection is a
technique to break the security of the database of the application.
- PHP SQL Quotes and Quoting
This example illustrates different ways to define single and double quotes
in the php application with sql query.
- PHP SQL Query
This example illustrates how to create and execute the sql query in php
application.
- PHP SQL Output
This example illustrates how to display the output fetched as a result of Sql
query execution on the browser.
- PHP SQL Null
This example describes about handling NULL values in sql
query in php.
- Mysql XOR
Mysql XOR returns you the output on the basis of condition specified in
input. The output of the XOR is 0 when both the specified inputs are same.
- Mysql Where Statement
Mysql Where Statement is useful when we want to return the records on the
basis of specified condition in Where Clause. The Where Clause restricts
the records and select only those records specified in it.
- USE
SQL Use Query is used to see the tables in database.
- UNION
SQL Union is used to combine the query of two or more Select
Statement. The Union Clause is used to return the combine set of
records from two tables.
- SQL Then
The Tutorial briefs you an example from SQL Then. To understand and grasp the
example we create a function total that accept the input parameter variable a
and b and returns a variable s.
- SQL Select From
SQL Select From keyword show you the records from a specified table.
- SQL PHP where
SQL PHP Where is used to built the connection between the SQL and
PHP. The PHP sever side script is used to retrieve the records that
meet a specific criteria from database
- SQL PHP
SQL PHP is used to execute the statement using the mysql_query ( )
function. The function is used to send a query or command to a MySQL
connection.
- SQL PHP code
SQL PHP code executes the statement using the mysql_query ( )
function. The function is used to send a query or command to a MySQL
connection.
- SQL PHP array
SQL PHP Array support simple dimension array. The SQL PHP Array is
used to populate array from MySQL database.
- SQL get Column Name
SQL get Column Name is used to return the Fieldnames of the table.
- SQL Backup Script
The Tutorial illustrate an example from 'SQL Backup Script'.
- SQL Avg Syntax
SQL Avg Syntax is used to compute the average of the records in a table.
- SQL Avg Function
SQL Avg Function is used to compute the average records value in a column of
specified table.
- SQL Aggregate Queries
SQL Aggregate Queries show you the list of Aggregate Function that include
Sum, Count, Average, Maximum, Minimum etc.
- SQL Aggregate Functions Where Clause
SQL Aggregate Functions Where Clause return you the aggregate sum of the
records based on the condition specified in Where Clause condition.
- SQL Aggregate Functions List
SQL Aggregate Functions List describe you the Aggregate Function List
Queries.
- SQL Aggregate Functions Where Clause
SQL Aggregate Functions Where Clause is used to perform various
Functions like Sum, Count, Average, Maximum and Minimum.
- SQL Aggregate Functions
SQL Aggregate Functions is built in function that is used for the
computation of records in a table.
- SQL Aggregate Concatenation
SQL Aggregate Concatenation are used to perform operation on concatenation of
different records from different fields.
- SQL Aggregate Concatenate
Sometimes it is required to combine the result set of records from
different fields.
- PHP Mysql Group By
PHP Mysql Group By is used to establish a relation between the PHP on the
server side and Mysql database on the backend.
- PHP SQL Example
A PHP scripting block is executed on the server side, and the html
result is sent to the browser.
- PHP SQL Die
PHP SQL Die results when there is a connection failure. The die( ) function
prints a message and exists from the current script.
- PHP SQL Connection
PHP SQL Connection is used to access and return the records from PHP and
MySQL database and vice-versa.
- PHP Mysql Database Connection
PHP Mysql Database Connection is used to build a connection between the PHP
on the server-side and Mysql on the backend.
- SQL ON
The ON clause is used to specify name of the fieldname on
which index is created.
- SQL Mode
SQL Mode is a Function that returns the frequent occurring value of a numeric
expression.
- SQL Indexes
SQL uses index to find records quickly when a query is processed. Using Index
can drastically enhance the performance of an application.
- SQL Concat
SQL Concat is used to combine the record set of different fields.
- SQL Average
SQL Average, the part of Aggregate Function. SQL Average is used to
compute average value of the records in a table of the database.
- PHP SQL close connection
PHP SQL close connection is used to close a connection between the PHP and
SQL.
- SQL Decimal
SQL Decimal is used to specify the values in decimal datatype. The Decimal
datatype can be of two types : Decimal (p) refers to floating point and Decimal
fixed point (p,s).
- SQL PHP
PHP is a server side scripting language. To access the data in PHP,you
must create a connection to the database.
- Mysql Exists
Mysql Exists return you only matches records of table 1 with table2. The
unmatchable records are not displayed in the output of the table.
- Mysql Phone Number Format
Mysql Phone Number Format is useful when you want to return the phone number
in specific format.
- Mysql Permission
Mysql Permission allows the user to connect to the database, Mysql checks and
use that the particular username/ password and combination has the permission to
connect.
- MySQL Not Like
MySQL Not Like returns only those set of records from employee which
are not listed in the 'where clause'.
- MySQL Not In
MySQL Not In is used to updates only those records of the table whose fields
'id' are not specified in the Where Clause.
- Mysql Not
Mysql Not is useful when you a perform Not Operation in SQL. The SQL query
returns you 1 and 0, when !o and !1 are selected in the select query.
- Mysql Nested Select
Mysql Nested Select is a SELECT query that is nested within a Select, Update,
Insert or Delete SQL query.
- Mysql Nested Case
Mysql Nested Case is a Select Query that is nested inside select, update,
delete and delete SQL query.
- MySQL nchar
MySQL nchar define the datatype nchar that stores fixed-length character
data.
- Mysql nchar Datatype
MySQL nchar define the datatype nchar that stores fixed-length character
data.
- MySQL Modulus
MySQL Modulus refer to the remainder value obtained when a value 'a' is
divided by 'b'.
- Mysql Mod
Mysql Mod (a,b) is performed to return remainder when b is divided by
a.
- Mysql Minus Query
Mysql Minus Query is used to return the calculated value from subtracting the
maximum value and minimum value.
- Mysql Minus Operator
Mysql Minus Query return the calculated value from subtracting the
maximum value and minimum value.
- Mysql Min Max
Mysql Min Max is useful to find the minimum and maximum records from a table.
- Mysql Min Date
Mysql Min Date is used to return the minimum date record from table Employee.
- Mysql Loader Tutorial
Mysql Loaded Tutorial is used to import a data to a plain text from Mysql
database.
- Mysql Find Duplicate Records
Mysql Find Duplicate Records is used to find the duplicate Records in the
table.
- Mysql CSV
The LOAD DATA INFILE statement provides you the way to import data from a
plain text file into database.
- MySQL Nested Example
MySQL Nested Select is select query, that is nested inside the select, update
and delete query based on the condition specified in a Where Clause.
- MySQL Not in Example
MySQL Not in is used to set the update of records for only those id,
which are not specified in the where Not In.
- MySQL Not equal
MySQL Not equal is used to return the set of only those records from a table
based on the condition specified in the Where Clause.
- MySQL Not Records
MySQL Not is used to return the set of record opposite to the values.
- MySQL Nested Select Example
MySQL Nested Select is select query, that is nested inside the select, update
and delete query based on the condition specified in a Where Clause.
- MySQL Add Column
MySQL Add Column is used to add the column to the existing table. The
Alter table keyword is used to modify the table structure and add
keyword is used to add the new column in a table.
- MySQL Addition
MySQL Addition returns you the sum value of the total counts in a table. The
Aggregate function is used to perform the calculation in SQL Query.
- MySQL Absolute Value
MySQL Absolute Value is used to return the absolute value of a records in
table. The keyword abs is used to return the absolute numerical value of
a records in a table.
- MySQL Begin Transaction
MySQL Begin Transaction is a point in which data is referenced by a
connection logically or physically. The error are encountered, when all the data
modification made after the begin transaction can set to rolled back to return
the data to known state of consistency.
- PHP SQL Variable
PHP SQL Variable are denoted with a leading dollar sign ($). The PHP
variable includes $ con , $ update and so on.
- PHP SQL Script
PHP SQL Script is useful to perform the operation of SQL queries in
PHP. The
PHP is a server side scripting language and open source software.
- PHP SQL Random
The PHP SQL Random is used to fetch data randomly from database in
PHP. The
Rand ( ) clause is used to fetch the random data from table into the
browser.
- PHP SQL Select Where
PHP SQL Select Where is used to provide the records from the table that meet
the specific criteria and print the records on the browser.
- PHP SQL Sanitize
PHP SQL Sanitize is a kind of filter which is used to allow or disallow
characters in a string.
- MySQL Converting Expression
MySQL Convert function is used to convert the data from one type to another
type. The CONVERT () function helps you to take a value of one type and result a
value of another type.
- MySQL Boolean Value
MySQl Boolean Value is used to display the Boolean type status of the field.
- MySQL Ascending Command
MySQL Ascending is used to return the records from a table in the ascending
order. The section will provides you the mean for arranging the data of database
table in ascending order.
- MySQL Auto_Increment
MySQL Auto_Increment is used to generate a unique number when a new record is
added to a table. The Unique number must be Primary key field that is created
automatically every time a new record is inserted in a table.
- MySQL ASC
Executing select query with order by clause returns the rows in the order of
column name specified with the order by clause. By default, the data is returned
in ascending order.
- MySQL Arithmetic
Arithmetic operators are used to perform mathematical operations on two
expressions to negate, add, subtract, multiply, and divide numeric values.
- MySQL Area
In this example we create a procedure to find the area of rectangle. In the
query below we take two double type variable l and b to be used as input to the
procedure and one variable "a" to be used as an output from the
procedure.
- MySQL Affected Rows
When we execute Sql query, it may affect some rows of the table. For example,
executing queries like update, insert, delete. These queries displays the
successful message with the number of rows affected by the query.

|