Archive: MYSQL Tutorial
-
Jul 26, 2011
No CommentsSelecting Data with SQL IN
Summary: In this tutorial, you will learn how to select a result set which their values match any one of a list of values by using SQL IN operator. SQL IN Operator Syntax The SQL IN operator allows you to select values that match any one of a list of values. The usage of the...
-
Jul 26, 2011
No CommentsHow to Use MySQL Limit to Constrain Number of Returned Records
Summary: In this tutorial, you will learn how to use MySQL LIMIT clause to constrain number of returned records in SQL SELECT statement. Most of the times, when you work with master data tables which contain thousand to millions of records and you don’t want to write a query to get all the data from...
-
Jul 26, 2011
No CommentsHow to Use MySQL Distinct to Eliminate Duplicate Rows
Summary: In this tutorial, you will learn how to use MySQL DISTINCT with SELECT statement to eliminate duplicate records in the selected result set. Sometimes when retrieving data from database table, you get duplicate records which are not expected. In order to remove those duplicate records, you need to use DISTINCT keyword along with SELECT...
-
Jul 26, 2011
No CommentsUsing MySQL SELECT Statement to Query Data
Summary:In this tutorial, you will learn how to MySQL SELECT statement to query data from database tables. MySQL SELECT Statement Syntax In order to retrieve data from MySQL database table you need to use MySQL SELECT statement. The following illustrates MySQL SELECT statment syntax: 1 SELECT column_name1,column_name2... 2 FROM tables 3 [WHERE conditions] 4 [GROUP BY group...
-
Jul 26, 2011
No CommentsManaging Database Index in MySQL
Summary: In this tutorial, you will learn how to work with database index in MySQL. You will learn how to use database index properly to speed up the data retrieval and what SQL statements to use to create or drop database index. Database indexes help to speed up the retrieval of data from MySQL database server. When retrieving...
-
Jul 26, 2011
No CommentsChanging Table Structure Using MySQL ALTER TABLE
Summary:In this tutorial you will learn how to use MySQL ALTER TABLE statement to change the structure of existing tables. MySQL ALTER TABLE syntax MySQL ALTER TABLE statement is used to change the structure of existing tables. You can use MySQL ALTER TABLE to add or drop column, change column data type, add primary key,...
-
Jul 26, 2011
No CommentsWorking with Database Table – Part I
Summary: In this tutorial you will learn how to create, show and describe tables in MySQL. Database table or table in short is one of the most important objects of relational database. How to create databases tables correctly is crucial when you work with any database system especially MySQL. In this tutorial, you will learn...
-
Jul 26, 2011
No CommentsUnderstanding MySQL TIMESTAMP
Summary: The MySQL TIMESTAMP is a temporal data type that store combination of date and time values. In this tutorial you will learn how MySQL TIMESTAMP values are stored in the database and how to use automatic initialization and automatic update to create created on and last changed on column in a table. How MySQL...
-
Jul 26, 2011
No CommentsMySQL Data Types
estamp value in ‘CCYY-MM-DD hh:mm:ss’ format YEAR A year value in CCYY or YY format Spatial Data Types MySQL support many spatial data types as below table which contains various kind of geometrical and geographical values. Spatial Data Types Description GEOMETRY A spatial value of any type POINT A point (a pair of X Y coordinates)...
-
Jul 26, 2011
No CommentsUnderstanding MySQL Table Types
Summary: In this tutorial, you will learn various table types in MySQL. It is essential to know what kind of table types or storage engine you use for your database to maximize the performance of your application. MySQL supports various of table types or storage engines to allow you to optimize your database. The table...
-
Jul 26, 2011
No CommentsManaging Databases in MySQL
Summary: In this tutorial you will learn how to manage database in MySQL. You will learn how to create a new database, list all databases in the MySQL database server and remove databases from database catalog. Let’s start creating a new database in MySQL. Creating Database To create a database in MySQL, you use the...
-
Jul 26, 2011
No CommentsWhat is MySQL’s Database hostname?
This documentation details your database hostname. Database Hostname: 127.0.0.1 (also known as “localhost“) Usage: When setting up a WordPress, ZenCart, OsCommerce, Magento, Drupal or Joomla style of website, you will need to specify where your database is located. Note: For advanced users, if connecting to our server from your local machine, simply use your domain...
-
Jul 22, 2011
No CommentsChange dropdown list (options) values from database with ajax and php
I’m going to show you a example in php and ajax to change the values of the dropdown’s options without refreshing the page. The values (options) of the dropdown are fetched from the database and the certain portion of the web pages is only refreshed without need to refresh the whole page. Let’s start with...
-
Jun 12, 2011
No CommentsWelcome to php2php.com
Welcome to...