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

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

Groups of Data Types in MySQL
How Many Groups of Data Types in MySQL? MySQL support 3 groups of data types as listed below: String Data Types - CHAR, NCHAR, VARCHAR, NVARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, BLOB, TEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET Numeric Data Types - BIT, TINYINT, BOOLEAN, SMALL...
2018-04-21, 1703🔥, 0💬

Escape Special Characters in MySQL
How To Escape Special Characters in SQL statements in MySQL? There are a number of special characters that needs to be escaped (protected), if you want to include them in a character string. Here are some basic character escaping rules: The escape character (\) needs to be escaped as (\\). The singl...
2018-04-12, 2662🔥, 0💬

Character String Data Types in MySQL
What Are Character String Data Types in MySQL? MySQL supports the following string data types: CHAR(n) same as CHARACTER(n) - Fixed width and " " padded characters strings. Default character set is ASCII. NCHAR(n) same as NATIONAL CHARACTER(n) - Fixed width and " " padded character strings with UTF8...
2018-04-12, 1712🔥, 0💬

Evaluating Expressions with SELECT Statements in MySQL
How To Calculate Expressions with SELECT Statements in MySQL? There is no special SQL statements to calculate expressions. But you can use the "SELECT expression FROM DUAL" statement return the calculated value of an expression. "DUAL" is a dummy table in the server. The tutorial exercise below show...
2018-04-12, 1657🔥, 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, 1608🔥, 0💬

Entering Character Strings in MySQL
How To Include Character Strings in SQL statements in MySQL? If you want to include character strings in your SQL statements, you need to quote them in one of the following formats: Using single quotes. For example 'FYIcenter.com'. Using double quotes. For example "FYI Center". Using single quotes p...
2018-04-12, 1562🔥, 0💬

Concatenating Character Strings in MySQL
How To Concatenate Two Character Strings in MySQL? If you want concatenate multiple character strings into one, you need to use the CONCAT() function. Here are some good examples: SELECT CONCAT('Welcome',' to') FROM DUAL; Welcome to SELECT CONCAT('FYI','center','.com') FROM DUAL; FYIcenter.com   ⇒ E...
2018-04-07, 1570🔥, 0💬

Entering Characters as HEX Numbers in MySQL
How To Enter Characters as HEX Numbers in MySQL? If you want to enter characters as HEX numbers, you can quote HEX numbers with single quotes and a prefix of (X), or just prefix HEX numbers with (0x). A HEX number string will be automatically converted into a character string, if the expression cont...
2018-03-31, 2010🔥, 0💬

Entering Binary Numbers in MySQL
How To Enter Binary Numbers in SQL Statements in MySQL? If you want to enter character strings or numeric values as binary numbers, you can quote binary numbers with single quotes and a prefix of (B), or just prefix binary numbers with (0b). Binary numbers will be automatically converted into charac...
2018-03-31, 1728🔥, 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, 1637🔥, 0💬

Entering Numeric Values in MySQL
How To Include Numeric Values in SQL statements in MySQL? If you want to include a numeric value in your SQL statement, you can enter it directly as shown in the following examples: SELECT 255 FROM DUAL; -- An integer 255 SELECT -6.34 FROM DUAL; -- A regular number -6.34 SELECT -32032.6809e+10 FROM ...
2018-03-31, 1576🔥, 0💬

Entering Numeric Values as HEX Numbers in MySQL
How To Enter Numeric Values as HEX Numbers in MySQL? If you want to enter numeric values as HEX numbers, you can quote HEX numbers with single quotes and a prefix of (X), or just prefix HEX numbers with (0x). A HEX number string will be automatically converted into a numeric value, if the expression...
2018-03-31, 1549🔥, 0💬

Converting Numeric Values to Character Strings in MySQL
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to character strings by using the CAST(value AS CHAR) function as shown in the following examples: SELECT CAST(4123.45700 AS CHAR) FROM DUAL; 4123.45700 -- How to get rid of the last 2 '0's? SELECT CAST(4.123...
2018-03-28, 3472🔥, 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, 1670🔥, 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, 1655🔥, 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, 1636🔥, 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, 1531🔥, 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, 1765🔥, 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, 1684🔥, 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, 1664🔥, 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, 1459🔥, 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, 3833🔥, 0💬

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