<< < 25 26 27 28 29 30 31 32 33 34 35 > >>   ∑:1243  Sort:Rank

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💬

Selecting an Existing Database in MySQL
How To Select an Exiting Database in MySQL? The first thing after you have created a connection object to the MySQL server is to select the database where your tables are located, by using the mysql_select_db() function. If your MySQL server is offered by your Web hosting company, they will assign a...
2017-10-23, 1417🔥, 0💬

Execute SQL Statements in MySQL
How To Execute a SQL Statement in MySQL? You can run any types of SQL statements through the mysql_query() function. It takes the SQL statement as a string and returns different types of data depending on the SQL statement type and execution status: Returning FALSE, if the execution failed. Returnin...
2017-10-23, 1396🔥, 0💬

Selecting Other User's Database in MySQL
Can You Select Someone Else Database in MySQL? If your MySQL server is provided by an Internet service company, they will provide you one database for your use only. There are many other databases on the server for other users. But your user account will have no privilege to select other databases. ...
2017-10-23, 1327🔥, 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, 1517🔥, 0💬

Using Multiple Columns in GROUP BY in MySQL
Can Multiple Columns Be Used in GROUP BY in MySQL? If you want to break your output into smaller groups, if you specify multiple column names or expressions in the GROUP BY clause. Output in each group must satisfy a specific combination of the expressions listed in the GROUP BY clause. The more col...
2017-10-16, 1470🔥, 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💬

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💬

Apply Filtering Criteria at Group Level in MySQL
How To Apply Filtering Criteria at Group Level in MySQL? If you want to return only specific groups from the query, you can apply filtering criteria at the group level by using the HAVING clause inside the GROUP BY clause. Note group functions can also be used in HAVING conditions. The following tut...
2017-10-16, 1406🔥, 0💬

Fixing INSERT Command Denied Error in MySQL
How To Fix the INSERT Command Denied Error in MySQL? The reason for getting the "1142: INSERT command denied" error is that your user account does not have the INSERT privilege on the table or database. To resolve this error, you need to ask your MySQL DBA to grant you the right privilege. Your DBA ...
2017-10-08, 4543🔥, 0💬

Managing Tables and Running Queries with PHP for MySQL
Where to find answers to frequently asked questions on Managing Tables and Running Queries with PHP for MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Tables and Running Queries with PHP for MySQL. Clear explanations and tutorial ...
2017-10-08, 1872🔥, 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, 1484🔥, 0💬

Creating a New Table in MySQL
How To Create a New Table in MySQL? If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "CREATE TABLE fyi_links (" . " id INTEGER NOT NULL" . ", url VARCHAR(80) NOT NULL" . ", notes VARCHAR...
2017-10-08, 1382🔥, 0💬

Inserting Data into an Existing Table in MySQL
How To Insert Data into an Existing Table in MySQL? If you want to insert a row of data into an existing table, you can use the INSERT INTO statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_links (id, url) VALUES (" . " 101, 'dev....
2017-10-08, 1372🔥, 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, 1501🔥, 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, 1426🔥, 0💬

Query with a Right Outer Join in MySQL
How To Write a Query with a Right Outer Join in MySQL? If you want to query from two tables with a right outer join, you can use the RIGHT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a right outer join from two tables: fyi_links and fyi_rates. The join condit...
2017-09-28, 1404🔥, 0💬

Query with a Left Outer Join in MySQL
How To Write a Query with a Left Outer Join in MySQL? If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two tables: fyi_links and fyi_rates. The join condition ...
2017-09-28, 1396🔥, 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, 1353🔥, 0💬

What Is a Result Set Object in MySQL
What Is a Result Set Object in MySQL? A result set object is a logical representation of data rows returned by mysql_query() function on SELECT statements. Every result set object has an internal pointer used to identify the current row in the result set. Once you get a result set object, you can us...
2017-09-20, 1723🔥, 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, 1279🔥, 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, 1492🔥, 0💬

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💬

Using Subqueries with the EXISTS Operator in MySQL
How To Use Subqueries with the EXISTS Operator in MySQL? A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from fyi_links table that th...
2017-09-17, 1405🔥, 0💬

<< < 25 26 27 28 29 30 31 32 33 34 35 > >>   ∑:1243  Sort:Rank