<< < 1 2 3 4 5 6 7 8 9 > >>   ∑:311  Sort:Rank

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

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

Expressions with NULL Values in MySQL
What Happens If NULL Values Are Involved in Expressions in MySQL? If NULL values are used in expressions, the resulting values will be NULL values. In other words: Arithmetic expressions with NULL values result NULL values. Comparison expressions with NULL values result NULL values. Logical expressi...
2018-03-28, 1325🔥, 0💬

Using CASE Expression in MySQL
How To Use CASE Expression in MySQL? There are 2 ways to use the CASE expression. The first way is to return one of the predefined values based on the comparison of a given value to a list of target values. The second way is to return one of the predefined values based on a list of conditions. Here ...
2018-03-24, 1552🔥, 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, 1479🔥, 0💬

What are Date and Time Data Types in MySQL
What Are Date and Time Data Types in MySQL? MySQL supports the following date and time data types: DATE - A date in the range of '1000-01-01' and '9999-12-31'. Default DATE format is "YYYY-MM-DD". DATETIME - A date with the time of day in the range of '1000-01-01 00:00:00' and '9999-12-31 23:59:59'....
2018-03-24, 1448🔥, 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, 1248🔥, 0💬

Date and Time Functions in MySQL
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time values: ADDDATE(date, INTERVAL expr unit) - Adding days to a date. Same as DATE_ADD(). ADDTIME(time1, time2) - Adding two time values together. CURDATE() - Returning the current date. Same as CURRENT_DATE...
2018-03-13, 3309🔥, 0💬

CREATE, ALTER and DROP Statements in MySQL
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on CREATE, ALTER and DROP Statements in MySQL. Clear answers are provided with tutorial exercises on cr...
2018-03-13, 3088🔥, 0💬

Ways to Get the Current Time in MySQL
How Many Ways to Get the Current Time in MySQL? There are 8 ways to get the current time: SELECT NOW() FROM DUAL; 2006-07-01 10:02:41 SELECT CURRENT_TIME() FROM DUAL; 10:02:58 SELECT SYSDATE() FROM DUAL; 2006-07-01 10:03:21 mysql&gt; SELECT CURRENT_TIMESTAMP() FROM DUAL; 2006-07-01 10:04:03 SELE...
2018-03-13, 2714🔥, 0💬

What Is TIMESTAMP Data Type in MySQL
What Is TIMESTAMP Data Type in MySQL? A TIMESTAMP data type allows you to record a date and time like DATETIME data type. But it has some interesting features when used on a table column: The first TIMESTAMP column in a table will be assigned with the current date and time, if it is not listed in an...
2018-03-13, 1649🔥, 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, 1483🔥, 0💬

CREATE Command Denied Error in MySQL
What Happens If You No CREATE Privilege in a Database in MySQL? In order to create tables in a database, your user account must have the CREATE privilege for that database. Otherwise you will get an error as shown in the following tutorial exercise: &gt;cd \mysql\bin &gt;mysql -u guest -ppub...
2018-03-10, 2313🔥, 0💬

Show All Columns of an Existing Table in MySQL
How To Get a List of Columns in an Existing Table in MySQL? If you have an existing table, but you don't remember what are the columns used in the table, you can use the "SHOW COLUMNS FROM tableName" command to get a list of all columns of the specified table. You can also use the "DESCRIBE tableNam...
2018-03-10, 1947🔥, 0💬

What Are DDL Statements in MySQL
What Are DDL Statements in MySQL? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are 3 primary DDL statements: CREATE - Creating a new database object. ALTER - Altering the definition of an existing data object. DROP - Dropping an exis...
2018-03-10, 1527🔥, 0💬

Show All Tables in a Database in MySQL
How To Get a List of All Tables in a Database in MySQL? If you want to see the table you have just created, you can use the "SHOW TABLES" command to get a list of all tables in database. The tutorial script gives you a good example: mysql&gt; SHOW TABLES; +---------------+ | Tables_in_fyi | +---...
2018-03-10, 1477🔥, 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💬

Rename an Existing Column in a Table in MySQL
How To Rename an Existing Column in a Table in MySQL? If you have an existing column in a table and you want to change the column name, you can use the "ALTER TABLE ... CHANGE" statement. This statement allows you to change the name of a column, and its definition. The tutorial script below gives yo...
2018-03-04, 1635🔥, 0💬

Add a New Column to an Existing Table in MySQL
How To Add a New Column to an Existing Table in MySQL? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the "ALTER TABLE ... ADD COLUMN" statement. The tutorial script below shows you a good example: mysql&gt; ALTER TABLE tip ADD COLU...
2018-03-04, 1554🔥, 0💬

Show CREATE TABLE Statements of Existing Tables in MySQL
How To See the CREATE TABLE Statement of an Existing Table in MySQL? If you want to know how an existing table was created, you can use the "SHOW CREATE TABLE" command to get a copy of the "CREATE TABLE" statement back on an existing table. The following tutorial script shows you a good example: mys...
2018-03-04, 1514🔥, 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, 1510🔥, 0💬

Delete an Existing Column in a Table in MySQL
How To Delete an Existing Column in a Table in MySQL? If you have an existing column in a table and you do not need that column any more, you can delete it with "ALTER TABLE ... DROP COLUMN" statement. Here is a tutorial script to delete an existing column: mysql&gt; ALTER TABLE tip DROP COLUMN ...
2018-03-04, 1451🔥, 0💬

Analyze Tables with "mysqlcheck" Command in MySQL
How To Analyze Tables with "mysqlcheck" in MySQL? If you want analyze tables with "mysqlcheck", you need to use the "--analyze" option. The following tutorial exercise shows you how to analyze all tables in "mysql" database: &gt;cd \mysql\bin &gt;mysqlcheck -u root --analyze mysql mysql.colu...
2018-02-28, 1924🔥, 0💬

What Is "mysqlcheck" Command in MySQL
What Is "mysqlcheck" in MySQL? "mysqlcheck" is a command-line interface for administrators to check and repair tables. Here are some sample commands supported by "mysqlcheck": "mysqlcheck databaseName tableName" - Checks the specified table in the specified database. "mysqlcheck databaseName" - Chec...
2018-02-28, 1757🔥, 0💬

<< < 1 2 3 4 5 6 7 8 9 > >>   ∑:311  Sort:Rank