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.

MySQL Examples, Learn MySQL with examples.

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:

  1. Mysql Switch CASE
    Mysql Switch Case perform one of several different actions based on several different conditions.
            
  2. Mysql Check
    Mysql Check is used to check the existence of table in the database.
               
  3. Mysql Decimal Datatype
    Mysql Decimal Datatype is used to specify the numeric values.
               
  4. Mysql Describe
    Mysql Describe is used to describe the table Field,Type,Null etc attribute.
              
  5. Mysql Else Condition
    Mysql Else Condition evaluate the statements in database to perform different actions based on different conditions.
              
  6. Mysql Exists
    The Tutorial covers on 'Mysql Exists'. The section helps you to understand an example from 'Mysql Exists'.
             
  7. 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.
              
  8. FROM
    Mysql From specify the table from which records is retrieved.
                           
  9. PHP SQL IF Statement
    This example illustrates how to use the 'if' statement in PHP when accessing the data from table in mysql database.
               
  10. Mysql Insert
    Mysql Insert is used to insert the records or rows to the table.
               
  11. PHP SQL Query Insert
    This example illustrates how to execute insert query in PHP application.
              
  12. PHP SQL LIKE Operator
    This example illustrates how to use the like operator in sql query.
               
  13. PHP SQL Login
    This Application illustrates how to create a login page where only authorized user can login and process further.
                
  14. MySQL Coalesce
    In this section, you will learn about MySQL Coalesce. It selects the first non-null value of its arguments.
              
  15. MySQL Connection String
    This section gives you brief description of MySQL connection string.
               
  16. 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.
              
  17. 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.
              
  18. Mysql Difference
    Mysql Difference is used to return the records that are the outcome of difference between the records in a table.
               
  19. 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.
               
  20. 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.
                 
  21. Mysql last record
    Mysql Last Record is used to return the last records from table 'employee1'. 
               
  22. Mysql last row
    Mysql Last Row is used to return the last records from table.
               
  23. Mysql left
    Mysql Left is used to return the Left String character from a String.
                 
  24. Mysql Left Function
    Mysql Left Function is used to return the leftmost string character from the string.
            
  25. Mysql String Length
    Mysql Length is used to return the length of the String.
            
  26. 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.
            
  27. 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.
              
  28. Mysql Like Command
    Mysql Like Command is used for retrieving the records from a table on the basis of pattern matching.
               
  29. Mysql Like Operator
    Mysql Like Operator is used to compare a part of string using the % wild card character.
               
  30. Mysql like syntax
    Mysql Like is used to retrieve the records on the basis of pattern matching in select query.
              
  31. Mysql Limit
    Mysql Limit is used to limit your query result to those which fall within a specified range.
             
  32. Mysql List
    Mysql List elaborate you an Query for listing databases, tables, Procedure, columns, usernames and its password.
                
  33. 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'.
              
  34. Mysql Loader Control File
    Mysql Loader Control File is the mean to import a data to a plain text from Mysql database.
              
  35. 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. 
                 
  36. Mysql Loader Tutorial
    Mysql Loaded Tutorial is used to import a data to a plain text from Mysql database.
               
  37. 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.
               
  38. Mysql Looping
    Looping in Mysql is a simple loop construct, that enables the repeated execution of the statement list.
             
  39. Mysql Lower Case
    Mysql Lower Case is used to convert the Upper Case letter to the Lower Case.
               
  40. 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.
               
  41. 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.
              
  42. Mysql Ltrim
    Mysql Ltrim is used to remove the left leading and trailing spaces in the string.
               
  43. Mysql Math Function
    Math Function involved in Mysql when we perform some operation on mathematical operator.
             
  44. 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.
              
  45. 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.
             
  46. Mysql MidString
    Mysql MidString is used to return the string, with sub string beginning at position pos and len.
               
  47. Mysql Minimum Query
    Mysql Minimum Query is useful when you want to return the minimum value record from table.
               
  48. Mysql Minus
    Mysql Minus is used to see only those records from table which are not in another table.
               
  49. Mysql Mod Function
    Mysql Mod Function is used to return the remainder of N divided by M.
               
  50. Mysql Multiple Date Insert
    Mysql Multiple Column Insert is used to add or insert multiple data to the table.
             
  51. 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.
                
  52. Mysql Multiply
    Mysql Multiply is used to define the product of any two or more numbers in a table.
             
  53. 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).
             
  54. 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.
             
  55. 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.
              
  56. 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.
              
  57. 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.
              
  58. 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".
               
  59. Mysql where
    Mysql Where returns only those records from table which are specified in the WHERE Clause.
                 
  60. 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.
             
  61. 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. 
            
  62. 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. 
            
  63. MySQL Cast
    Here, you will learn about the MySQL CAST() function. 
              
  64. 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.
             
  65. 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.
            
  66. 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.
              
  67. MySQL Convert
    This section describes about the MySQL convert. It provides a way for converting the data of one type to another type.
             
  68. MySQL Count
    This example illustrates how to use count() in MySQL database.
           
  69. Mysql Create Table
    Mysql Create Table is used to create a table in database.
           
  70. Mysql Current TimeStamp
    Mysql Current Timse Stamp is used to show the current time and current date in your database.
              
  71. Mysql Declare Procedure
    Mysql Declare Procedure is used to define a local variable within a procedure. The local variable are used within the procedure.
            
  72. Mysql From Table
    Mysql From Table is used to specify the table from which the records is retrieved.
               
  73. 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