<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:311  Sort:Date

Show All Indexes of a given Table in MySQL
How To Get a List of Indexes of a Given Table in MySQL? If you want to see the index you have just created for an existing table, you can use the "SHOW INDEX FROM tableName" command to get a list of all indexes in a given table. The tutorial script below shows you a nice example: mysql&gt; SHOW ...
2018-02-14, 1498🔥, 0💬

Creating New Tables with SELECT Statements in MySQL
How To Create a New Table by Selecting Rows from Another Table in MySQL? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "CREATE TABLE ... SELECT" statement. The tutorial script below gives you a good...
2018-03-04, 1497🔥, 0💬

List Table Names with "mysqlshow" Command in MySQL
How To Show Table Names with "mysqlshow" in MySQL? If you want to show table names with "mysqlshow", you need to specify a database name. The followings tutorial exercise shows you how to get all table names that match a pattern: If you want analyze tables with "mysqlcheck", you need to use the "--a...
2018-05-19, 1493🔥, 0💬

Deleting Multiple Rows from a Table in MySQL
How To Delete Multiple Rows from a Table in MySQL? You can delete multiple rows from a table in the same way as deleting a single row, except that the WHERE clause will match multiple rows. The tutorial exercise below deletes 3 rows from the fyi_links table: mysql&gt; SELECT id, url, notes, coun...
2018-01-08, 1493🔥, 0💬

Tables Using MyISAM Storage Engine in MySQL
How To Create a New Table Using MyISAM Storage Engine in MySQL? MyISAM storage engine is based on the ISAM (Indexed Sequential Access Method) concept, which was first developed at IBM to store and retrieve data on secondary storage systems like tapes. MyISAM storage engine offers fast data storage a...
2017-09-12, 1492🔥, 0💬

Dividing Query Output into Groups in MySQL
How To Divide Query Output into Groups in MySQL? You can divide query output into multiple groups with the GROUP BY clause. It allows you specify a column as the grouping criteria, so that rows with the same value in that column will be considered as a single group. When the GROUP BY clause is speci...
2017-10-16, 1491🔥, 0💬

Sorting Query Output in MySQL
How To Sort the Query Output in MySQL? If you want the returning rows to be sorted, you can specify a sorting expression in the ORDER BY clause. The simplest sort expression is column name who's values will be sorted by. The following select statement returns rows sorted by the values in the "counts...
2017-11-02, 1490🔥, 0💬

Define the ID Column as Auto-Incremented in MySQL
How To Define the ID Column as Auto-Incremented in MySQL? Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow MySQL server to automatically ass...
2017-09-12, 1489🔥, 0💬

Transaction Roll Back when Session Ended in MySQL
What Happens to the Current Transaction If the Session Is Ended in MySQL? If a session is ended, the current transaction in that session will be rolled back and ended. All the database changes made in the current transaction will be removed. This is called an implicit rollback when session is ended....
2017-08-03, 1489🔥, 0💬

Giving Privileges at Server Level in MySQL
How To Grant User Privileges at the Global Level in MySQL? If you want to grant a user privilege at the global level, you can use the "GRANT privilegeName ON *.* TO userName" command. The argument "*.*" in the command stands for all database and all tables. The following tutorial exercise shows you ...
2017-08-21, 1487🔥, 0💬

What Are User Privileges in MySQL
What Are User Privileges in MySQL? MySQL offers many user privileges to control user accesses to different functions and data objects. Here are some commonly used privileges: ALL - All privileges. CREATE - Allows the user to use CREATE TABLE commands. ALTER - Allows the user to use ALTER TABLE comma...
2017-12-09, 1486🔥, 0💬

Failed to Create a Database in MySQL
What Happens If You Do Not Have Privileges to Create Database in MySQL? If your MySQL server is provided by your Internet service company, your user account will most likely have no privilege to create new databases on the server. In that case, your CREATE DATABASE statement will fail. Here is an ex...
2017-11-11, 1479🔥, 0💬

What Is Foreign Key in MySQL
What Is Foreign Key in MySQL? A foreign key is a single column or multiple columns defined to have values that can be mapped to a primary key in another table.   ⇒ What Is Index in MySQL ⇐ What Is Primary key in MySQL ⇑ Database Basics and Terminologies in MySQL ⇑⇑ MySQL Database Tutorials
2017-07-07, 1479🔥, 0💬

Order of Columns in the SET Clause in MySQL
Is the Order of Columns in the SET Clause Important in MySQL? Yes. The order of columns in the SET clause of the UPDATE statement is important. There is a BIG DIFFERENCE between MySQL and Oracle on update columns with previous values: Oracle provides you the existing values from the database on colu...
2018-01-13, 1476🔥, 0💬

Number of Rows Selected or Affected in MySQL
How To Get the Number of Rows Selected or Affected by a SQL Statement in MySQL? There are two functions you can use the get the number of rows selected or affected by a SQL statement: mysql_num_rows($res) - Returns the number of rows selected in a result set object returned from SELECT statement. my...
2017-10-08, 1473🔥, 0💬

Retrieving Execution Error Message in MySQL
How To Get MySQL Statement Execution Errors in MySQL? When you execute a MySQL statement with mysql_query(), and the statement failed, mysql_query() will return the Boolean value FALSE. This is good enough to tell that there is something wrong with that statement. But if you want to know more about ...
2017-10-23, 1472🔥, 0💬

Incrementing a Date by 1 in MySQL
How To Increment Dates by 1 in MySQL? If you have a date, and you want to increment it by 1 day, you can use the DATE_ADD(date, INTERVAL 1 DAY) function. You can also use the date interval add operation as "date + INTERVAL 1 DAY". The tutorial exercise below gives you some good examples: SELECT DATE...
2017-12-26, 1471🔥, 0💬

Query with a Full Outer Join in MySQL
How To Write a Query with a Full Outer Join in MySQL? There is no way to do full outer join in MySQL. It does not support this feature at the current MySQL release.   ⇒ Inner Join with the WHERE Clause in MySQL ⇐ Query with a Right Outer Join in MySQL ⇑ SELECT Statements with JOIN and Subqueries in...
2017-09-28, 1471🔥, 0💬

Using Table Alias Names in MySQL
How To Define and Use Table Alias Names in MySQL? When column names need to be prefixed with table names, you can define table alias name and use them to prefix column names as shown in the following select statement: mysql&gt; SELECT l.id, l.url, r.comment FROM fyi_links l INNER JOIN fyi_rates ...
2017-12-31, 1468🔥, 0💬

What Is Commit in MySQL
What Is Commit in MySQL? Commit is a way to terminate a transaction with all database changes to be saved permanently to the database server.   ⇒ What Is RollBack in MySQL ⇐ What Is Transaction in MySQL ⇑ Database Basics and Terminologies in MySQL ⇑⇑ MySQL Database Tutorials
2016-10-16, 1467🔥, 0💬

Extract Unit Values from a Date and Time in MySQL
How To Extract a Unit Value from a Date and Time in MySQL? If you want to extract a specific date or time unit value out of a date or a time, you can use the EXTRACT(unit FROM expression) function. The tutorial exercise below gives you some good examples: ELECT EXTRACT(DAY FROM NOW()) FROM DUAL; 28 ...
2018-03-13, 1463🔥, 0💬

Groups of Data Types in MySQL
How Many Groups of Data Types in MySQL? MySQL support 3 groups of data types as listed below: String Data Types - CHAR, NCHAR, VARCHAR, NVARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, BLOB, TEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET Numeric Data Types - BIT, TINYINT, BOOLEAN, SMALL...
2018-04-21, 1462🔥, 0💬

Using Regular Expression with REGEXP in MySQL
How To Use Regular Expression in Pattern Match Conditions in MySQL? If you have a pattern that is too complex for LIKE to handle, you can use the regular expression pattern condition: REGEXP. The following tutorial exercise provides you some good examples: SELECT 'FYICenter.com' REGEXP '.*fyi.*' FRO...
2018-03-24, 1461🔥, 0💬

What Is a Subquery in MySQL
What Is a Subquery in MySQL? A subquery is a SELECT statement used as part of the selection criteria of the main SELECT statement. The subquery specified in the WHERE clause will be evaluated repeated on each row of the selection base table. The output of the subquery will be used in the final evalu...
2017-09-17, 1461🔥, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:311  Sort:Date