<< < 8 9 10 11 12 13 14 15 16 > >>   ∑:372  Sort:Date

Retrieving MySQL Server information in MySQL
How To Get Some Basic Information Back from MySQL Servers in MySQL? Once you got a MySQL server connection object successfully, you can use mysql_get_server() and mysql_get_host_info() to get some basic information from your MySQL server. The tutorial exercise below is a good example: &lt;?php $...
2017-11-11, 2085🔥, 0💬

Selecting All Columns of All Rows in MySQL
How To Select All Columns of All Rows from a Table in MySQL? The simplest query statement is the one that selects all columns of all rows from a single table: "SELECT * FROM tableName;". The (*) in the SELECT clause tells the query to return all columns. The missing WHERE clause tells the query to r...
2017-11-05, 2085🔥, 0💬

Server Daemon mysqld Administration in MySQL
Where to find answers to frequently asked questions on Server Daemon mysqld Administration in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Server Daemon mysqld Administration in MySQL. Clear answers are provided with tutorial exercises o...
2017-12-09, 2070🔥, 0💬

Rename an Existing User Account in MySQL
How To Rename an Existing User Account Name in MySQL? If you want to change the name of an existing user account, you can use the "RENAME USER oldName TO newName" command. The tutorial exercise below shows you how to do this: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf mysql mysql&gt...
2017-12-13, 2066🔥, 0💬

Giving Privileges at the Database Level in MySQL
How To Grant User Privileges at the Database Level in MySQL? If you want to grant a user privilege at the database level, you can use the "GRANT privilegeName ON databaseName.* TO userName" command. The argument "databasename.*" in the command stands for all tables in the specified database. The fol...
2017-08-21, 2065🔥, 0💬

Adding More Data to the Test Table in MySQL
How To Add More Data to the Testing Table in MySQL? If you want to continue with other tutorial exercises in this FAQ collection, you need to add more data to the testing table. Follow the script below to add a new column and: mysql&gt; ALTER TABLE fyi_links ADD COLUMN tag VARCHAR(8); mysql&...
2017-11-02, 2064🔥, 0💬

Filerting out Duplications in Returning Rows in MySQL
How To Filter Out Duplications in Returning Rows in MySQL? If there are duplications in the returning rows, and you want to remove the duplications, you can use the keyword DISTINCT in the SELECT clause. The DISTINCT applies to the combination of all data fields specified in the SELECT clause. The t...
2018-01-06, 2056🔥, 0💬

Counting Groups Returned from GROUP BY in MySQL
How To Count Groups Returned with the GROUP BY Clause in MySQL? If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the number of groups, you can put the GROUP BY query into a...
2017-12-21, 2043🔥, 0💬

Updating Values in a Table in MySQL
How To Update Values in a Table in MySQL? If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The tutorial script below shows a good example: mysql&gt; UPDATE fyi_links SET counts = 999, notes = 'Good.' WHERE id = 101; Query OK, 1 row affec...
2018-01-13, 2040🔥, 0💬

Rename an Existing Table in MySQL
How To Rename an Existing Table in MySQL? If you want to rename an existing table, you can use the "ALTER TABLE ... RENAME TO" statement. The tutorial script below shows you a good example: mysql&gt; ALTER TABLE tip RENAME TO faq; Query OK, 0 rows affected (0.01 sec) mysql&gt; SELECT * FROM ...
2018-02-14, 2030🔥, 0💬

SESSION_USER() - Synonym for USER()
What's the difference between SESSION_USER() and USER() functions? SESSION_USER() is a synonym for the USER() function. Related MySQL functions: USER() - Login Name of Current User SESSION_USER() - Synonym for USER() SYSTEM_USER() - Synonym for USER() CURRENT_USER() - Authentication Name of Current ...
2025-01-07, 2028🔥, 0💬

Assign Names to Query Output Columns in MySQL
How To Name Query Output Columns in MySQL? Each column in the query output has a default name. If you don't like the default name, you can specify a new name for any column in the query output by using the AS clause. The following statement shows you a good example: mysql&gt; SELECT tag AS Categ...
2017-09-28, 2025🔥, 0💬

Running MySQL Server on a Specific Port in MySQL
How To Run MySQL Server on a Different Port in MySQL? By default, MySQL will listen at port number 3306 for any client connections. But you can change this by starting the server with "--port=portNumber" option. The tutorial exercise shows you how to start the server to listen to a different port nu...
2017-11-29, 2009🔥, 0💬

Using Group Functions in the ORDER BY Clause in MySQL
Can Group Functions Be Used in the ORDER BY Clause in MySQL? If the query output is aggregated as groups, you can sort the groups by using group functions in the ORDER BY clause. The following statement returns how many links were created in each year in each tag. The group output is sorted by the c...
2017-12-31, 2007🔥, 0💬

Selecting Columns in a Query in MySQL
How To Select Some Columns from a Table in MySQL? If you want explicitly tell the query to return some columns, you can specify the column names in the SELECT clause. The following select statement returns only two columns, "id" and "url" from the table "fyi_links": mysql&gt; SELECT id, url FROM...
2017-11-05, 2005🔥, 0💬

Using LIKE Conditions in MySQL
How To Use LIKE Conditions in MySQL? A LIKE condition is also called pattern patch. There are 3 main rules on using LIKE condition: '_' is used in the pattern to match any one character. '%' is used in the pattern to match any zero or more characters. ESCAPE clause is used to provide the escape char...
2018-03-24, 1975🔥, 0💬

What Is a SELECT Query Statement in MySQL
What Is a SELECT Query Statement in MySQL? The SELECT statement is also called the query statement. It is the most frequently used SQL statement in any database application. A SELECT statement allows you to retrieve data from one or more tables or views, with different selection criteria, grouping c...
2017-11-05, 1974🔥, 0💬

UNCOMPRESS() - Uncompressing Data
How to uncompress (restore) compressed data using the UNCOMPRESS() function? UNCOMPRESS(str) is a MySQL built-in function that uncompresses a given compressed byte string using the default LZ77 compression algorithm. For example: SELECT UNCOMPRESS(x'37000000789C738BF 44C4ECD2B492DD24BCECFD57123960 700...
2024-12-18, 1962🔥, 0💬

Inserting Rows with a SELECT Statement in MySQL
How To Insert Multiple Rows with a SELECT Statement in MySQL? If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_l...
2017-09-20, 1925🔥, 0💬

DATABASE() - Name of Current Database
How to obtain the name of the current database using the DATABASE() function? DATABASE() is a MySQL built-in function that returns the name of the current database. For example: USE mysql; Database changed SELECT DATABASE(); -- +------------+ -- | DATABASE() | -- +------------+ -- | mysql | -- +----...
2025-06-18, 1809🔥, 0💬

CURRENT_USER() - Authentication Name of Current User
How to obtain the authentication name of the current user using the CURRENT_USER() function? CURRENT_USER() is a MySQL built-in function that returns the authentication name of the current user. The authentication name is a combination of "User" and "Host" columns in the mysql.user table and used to...
2025-06-18, 1683🔥, 0💬

JSON_STORAGE_FREE() - Free Space in JSON Value
How to obtain the free space size in a JSON table column using the JSON_STORAGE_FREE() function? JSON_STORAGE_FREE(json) is a MySQL built-in function that returns the free space size in a JSON table column. Free space occurs when JSON table column is partially updated with less data. For example: CR...
2024-12-18, 1646🔥, 0💬

LAG() - N-Row before Current Row within Window
How to evaluate a field expression on n-row before the current row in the current result set window using the LAG() function? LAG(exp, n, default) is a MySQL built-in window function that evaluates a field expression on n-row before the current row in the current result set window. For example: SELE...
2024-09-28, 1646🔥, 0💬

UNCOMPRESSED_LENGTH() - Uncompressed Data Length
How to calculate the original data length of a compressed byte string using the UNCOMPRESSED_LENGTH() function? UNCOMPRESSED_LENGTH(str) is a MySQL built-in function that returns the original data length of a given compressed byte string. For example: SET @bin = x'37000000789C738BF44C4ECD2B49 2DD24BC...
2024-12-18, 1592🔥, 0💬

<< < 8 9 10 11 12 13 14 15 16 > >>   ∑:372  Sort:Date