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

Using Subqueries with the IN Operator in MySQL
How To Use Subqueries with the IN Operator in MySQL? A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operation. The following tutorial exercise shows you how to u...
2017-09-17, 1444🔥, 0💬

Converting Character Strings to Numeric Values in MySQL
How To Convert Character Strings to Numeric Values in MySQL? You can convert character strings to numeric values by using the CAST(string AS DECIMAL) or CAST(string AS SIGNED INTEGER) function as shown in the following examples: SELECT CAST('4123.45700' AS DECIMAL) FROM DUAL; 4123.46 -- Very poor co...
2018-03-28, 1442🔥, 0💬

What Are DML Statements in MySQL
What Are DML Statements in MySQL? DML (Data Manipulation Language) statements are statements to change data values in database tables. The are 3 primary DML statements: INSERT - Inserting new rows into database tables. UPDATE - Updating existing rows in database tables . DELETE - Deleting existing r...
2018-01-24, 1442🔥, 0💬

SELECT Statements with JOIN and Subqueries in MySQL
Where to find answers to frequently asked questions on SELECT Statements with JOIN and Subqueries in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SELECT Statements with JOIN and Subqueries in MySQL. Clear answers are provided with tutori...
2017-12-31, 1440🔥, 0💬

DDL Commands Supported in MySQL
How Many SQL DDL Commands Are Supported by "mysql" in MySQL? There are 4 SQL Data Definition Language (DDL) commands that are supported by "mysql". They are listed below with short descriptions: "CREATE dataObjectType dataObjectName" - Creates new databases, tables, views, triggers, indexes, and oth...
2018-04-21, 1439🔥, 0💬

Ways to Start MySQL Server in MySQL
How To Start MySQL Server Daemon mysqld in MySQL? There are a number of ways to start MySQL server daemon, mysqld: Double click on the file name, mysqld.exe, in a file explorer window. This is an easy way to start the server. But you will not be able to specify any command line options. Enter "mysql...
2017-12-04, 1439🔥, 0💬

Deleting an Existing Database in MySQL
How To Drop an Existing Database in MySQL? If want to drop an existing database from the MySQL server, you can use the DROP DATABASE statement. Here is a good example of dropping an existing database: $con = mysql_connect('localhost:8888' ,'dev', 'iyf'); $sql = 'DROP DATABASE fyi'; if (mysql_query($...
2017-10-23, 1437🔥, 0💬

Turn on Binary Logs in MySQL
How To Turn on Binary Logs in MySQL? If you want MySQL to write binary logs to a file, you can use the "--log-bin=fileBaseName" option at the "mysqld" command line. The tutorial exercise below shows you a good example on how to use this option: &gt;cd \mysql\bin &gt;mkdir \mysql\logs &gt...
2017-11-29, 1436🔥, 0💬

Group Functions with Non-group Selections in MySQL
Can Group Functions Be Mixed with Non-group Selection Fields in MySQL? If a group function is used in the SELECT clause, all other selection fields must be group level fields. Non-group fields can not be mixed with group fields in the SELECT clause. The script below gives you an example of invalid S...
2017-10-16, 1436🔥, 0💬

Transaction Committed when DDL Statement Executed in MySQL
What Happens to the Current Transaction If a DDL Statement Is Executed in MySQL? If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement. ...
2016-10-17, 1435🔥, 0💬

Entering Boolean Values in MySQL
How To Enter Boolean Values in SQL Statements in MySQL? If you want to enter Boolean values in SQL statements, you use (TRUE), (FALSE), (true), or (false). Here are some good examples: SELECT TRUE, true, FALSE, false FROM DUAL; +------+------+-------+------- +| TRUE | TRUE | FALSE | FALSE | +------+...
2018-03-31, 1434🔥, 0💬

Query with an Inner Join in MySQL
How To Write a Query with an Inner Join in MySQL? If you want to query from two tables with an inner join, you can use the INNER JOIN ... ON clause in the FROM clause. The tutorial exercise below creates another testing table and returns output with an inner join from two tables: fyi_links and fyi.r...
2017-12-31, 1433🔥, 0💬

Viewing Log File with "mysqlbinlog" in MySQL
How To Use mysqlbinlog to View Binary Logs in MySQL? If you have binary logs turned on, you can use "mysqlbinlog" to view the binary log files. The tutorial exercise below shows you how to view two binary files together: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf test &gt;mysqlbinlo...
2017-11-29, 1433🔥, 0💬

Create an Index for a Given Table in MySQL
How To Create an Index for a Given Table in MySQL? If you have a table with a lots of rows, and you know that one of the columns will be used often as a search criteria, you can add an index for that column to improve the search performance. To add an index, you can use the "CREATE INDEX" statement ...
2018-02-14, 1430🔥, 0💬

Using IN Conditions in MySQL
How To Use IN Conditions in MySQL? An IN condition is single value again a list of values. It returns TRUE, if the specified value is in the list. Otherwise, it returns FALSE. Some examples are given in the tutorial exercise below: SELECT 3 IN (1,2,3,4,5) FROM DUAL; 1 SELECT 3 NOT IN (1,2,3,4,5) FRO...
2018-03-28, 1428🔥, 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, 1428🔥, 0💬

What Is "mysqlshow" Command in MySQL
What Is "mysqlshow" in MySQL? "mysqlshow" is a command-line interface for end users to see information on tables and columns. Here are some sample commands supported by "mysqlshow": "mysqlshow" - Shows all the databases. "mysqlshow databaseName" - Shows all the tables in the specified database. "mys...
2018-02-28, 1426🔥, 0💬

Counting Duplicated Values in a Column in MySQL
How To Count Duplicated Values in a Column in MySQL? If you have a column with duplicated values, and you want to know what are those duplicated values are and how many duplicates are there for each of those values, you can use the GROUP BY ... HAVING clause as shown in the following example. It ret...
2017-10-16, 1426🔥, 0💬

Using Group Functions in the SELECT Clause in MySQL
How To Use Group Functions in the SELECT Clause in MySQL? If group functions are used in the SELECT clause, they will be used on the rows that meet the query selection criteria, the output of group functions will be returned as output of the query. The following select statement returns 3 values cal...
2018-01-06, 1425🔥, 0💬

Inner Join with the WHERE Clause in MySQL
How To Write an Inner Join with the WHERE Clause in MySQL? If you don't want to use the INNER JOIN ... ON clause to write an inner join, you can put the join condition in the WHERE clause as shown in the following query example: mysql&gt; SELECT l.id, l.url, r.comment FROM fyi_links l, fyi_rates...
2017-09-28, 1425🔥, 0💬

CREATE TABLE Statement in MySQL
How To Create a New Table in MySQL? If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip": mysql&gt; CREATE TABLE tip (id INTEGER PRIMARY KEY, subject VARCHAR(80) NOT NULL, description VARCHAR(256) ...
2018-03-10, 1423🔥, 0💬

Experiment with Dead Locks in MySQL
How To Experiment Dead Locks in MySQL? If you want to have some experience with dead locks, you can create two windows running two mysql transactions in two sessions at the REPEATABLE READ transaction isolation level. Then run some UPDATE statements as shown in the tutorial exercise below: (session ...
2017-07-21, 1423🔥, 0💬

Using SELECT Statements in Views in MySQL
Can SELECT Statements Be Used on Views in MySQL? Select (query) statements can be used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view: mysql&gt; CREATE VIEW myLinks AS SELECT * FROM fyi_links WHERE url LIKE ...
2018-01-06, 1422🔥, 0💬

Sorting Output in Descending Order in MySQL
How To Sort Output in Descending Order in MySQL? If you want to sort a column in descending order, you can specify the DESC keyword in the ORDER BY clause. The following SELECT statement first sorts the "tag" in descending order, then sorts the "counts" in ascending order: mysql&gt; SELECT tag, ...
2017-11-02, 1422🔥, 0💬

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