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

What Is NULL Value in MySQL
What Are NULL Values in MySQL? NULL is a special value that represents no value. Here are basic rules about NULL values: NULL presents no value. NULL is not the same as an empty string ''. NULL is not the same as a zero value 0. NULL can be used as any data type. NULL should not be used in any compa...
2018-03-28, 1422🔥, 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💬

Including Comments in SQL Statements in MySQL
How To Include Comments in SQL Statements in MySQL? If you want to include comments in a SQL statement, you can first enter "--", then enter your comment until the end of the line. The tutorial exercise below shows you some good examples: SELECT 'Hello world!' FROM DUAL; -- My first SQL statement! I...
2018-04-12, 1415🔥, 0💬

Insert Multiple Rows with 1 INSERT Statement in MySQL
How To Insert Multiple Rows with One INSERT Statement in MySQL? If you want to insert multiple rows with a single INSERT statement, you can use a subquery instead of the VALUES clause. Rows returned from the subquery will be inserted the target table. The following tutorial exercise gives a good exa...
2018-01-16, 1410🔥, 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💬

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💬

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💬

Data Removed in MEMORY Tables in MySQL
What Happens to MEMORY Tables When MySQL Server Is Stopped in MySQL? If you have data rows stored in a table with the MEMORY storage engine, and the MySQL server has been shut down by the DBA, all data rows will be removed. But the table structure will remain in the server. The tutorial exercise bel...
2017-08-08, 1404🔥, 0💬

Show the Current Transaction Mode in MySQL
How To Find Out the Current Transaction Mode in MySQL? If you are not sure about your current transaction mode, you can use the "SELECT @@AUTOCOMMIT FROM DUAL" statement to find out as shown in the following tutorial exercise: &gt;\mysql\bin\mysql -u dev -piyf fyi mysql&gt; SELECT @@AUTOCOMM...
2016-10-17, 1403🔥, 0💬

Converting Dates to Character Strings in MySQL
How To Convert Dates to Character Strings in MySQL? You can convert dates to character strings using the DATE_FORMAT(date, format) function. MySQL supports the following basic formatting codes: %a Abbreviated weekday name (Sun..Sat) %b Abbreviated month name (Jan..Dec) %c Month, numeric (0..12) %D D...
2017-12-26, 1400🔥, 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💬

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💬

Deleting Existing Rows in MySQL
How To Delete Existing Rows in a Table in MySQL? If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row: &lt;?php include "mysql_connection.php"; $sql = "DELETE FROM fyi_links WHERE id = 1102...
2017-06-28, 1396🔥, 0💬

Drop an Existing Table in MySQL
How To Drop an Existing Table in MySQL? If you want to delete an existing table and its data rows, you can use the "DROP TABLE" statement as shown in the tutorial script below: mysql&gt; SELECT * FROM tipBackup; +----+-------------+---------- ---------------+-------------+| id | subject | descri...
2018-02-14, 1394🔥, 0💬

Deleting All Rows in a Table in MySQL
How To Delete All Rows in a Table in MySQL? If you want to delete all rows from a table, you have two options: Use the DELETE statement with no WHERE clause. Use the TRUNCATE TABLE statement. The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good exampl...
2018-01-08, 1392🔥, 0💬

Count Number of Rows with SELECT Statements in MySQL
How To Use SELECT Statement to Count Number of Rows in MySQL? If you want to count the number of rows, you can use the COUNT(*) function in the SELECT clause. The following tutorial exercise shows you some good example: mysql&gt; SELECT COUNT(*) FROM fyi_links; +----------+ | COUNT(*) | +-------...
2018-01-06, 1392🔥, 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, 1392🔥, 0💬

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, 1385🔥, 0💬

Drop an Existing View in MySQL
How To Drop an Existing View in MySQL? If you have an existing view, and you don't want it anymore, you can delete it by using the "DROP VIEW viewName" statement as shown in the following script: mysql&gt; DROP VIEW faqComment; Query OK, 0 rows affected (0.00 sec) mysql&gt; SELECT * FROM faq...
2018-01-24, 1384🔥, 0💬

Returning Top 5 Rows in MySQL
How To Return Top 5 Rows in MySQL? If you want the query to return only the first 5 rows, you can use the LIMIT clause, which takes one parameter as the maximum number of rows to return. The following statement returns the first 5 rows from the fyi_links: mysql&gt; SELECT id, url, counts, tag FR...
2017-12-21, 1384🔥, 0💬

Start a New Transaction Explicitly in MySQL
How To Start a New Transaction Explicitly in MySQL? If you are confused on the implicit new transaction rules, you can always start a new transaction with the "START TRANSACTION" command to start a new transaction explicitly. "START TRANSACTION" command works in both "Autocommit On" and "Autocommit ...
2016-10-17, 1384🔥, 0💬

What Is SQL Standard in MySQL
What Is SQL Standard in MySQL? SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Relational Database Management Systems). SQL was developed by IBM Corporation. SQL became an ANSI standard, called SQL-87, in 1986. ISO made a major revision, called SQL-92, in 1992. The latest r...
2018-04-21, 1383🔥, 0💬

Use "mysql" to Run SQL Statements in MySQL
How To Use "mysql" to Run SQL Statements in MySQL? If you want to run SQL statement to your server with "mysql", you need to start "mysql" and enter your SQL statement at the "mysql" prompt. Here is a good tutorial exercise that shows you how to run two SQL statements with "mysql": &gt;cd \mysql...
2018-02-28, 1383🔥, 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💬

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