1 2 3 4 5 > >>   Sort: Date

How To Concatenate Two Character Strings
How To Concatenate Two Character Strings? - MySQL FAQs - Introduction to SQL Basics 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...
2007-05-11, 11077👍, 0💬

How To Enter Binary Numbers in SQL Statements
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics 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 au...
2007-05-11, 9924👍, 0💬

How To Enter Numeric Values as HEX Numbers
How To Enter Numeric Values as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics 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...
2007-05-11, 9120👍, 0💬

How To Enter Boolean Values in SQL Statements
How To Enter Boolean Values in SQL Statements? - MySQL FAQs - Introduction to SQL Basics 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 ...
2007-05-11, 8976👍, 0💬

How To Calculate Expressions with SQL Statements
How To Calculate Expressions with SQL Statements? - MySQL FAQs - Introduction to SQL Basics 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. Th...
2016-11-09, 8416👍, 1💬

💬 2016-11-09 lux: good

How To Divide Query Output into Groups
How To Divide Query Output into Groups? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY 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...
2007-05-11, 7767👍, 0💬

How To Use Subqueries with the IN Operator
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries 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 operatio...
2007-05-11, 7337👍, 0💬

How To Escape Special Characters in SQL statements
How To Escape Special Characters in SQL statements? - MySQL FAQs - Introduction to SQL Basics 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...
2007-05-11, 7231👍, 0💬

How To Return Top 5 Rows
How To Return Top 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries 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 fy...
2007-05-11, 7226👍, 0💬

How To Use Subqueries in the FROM clause
How To Use Subqueries in the FROM clause? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you have a query returning many rows of data, and you want to perform another query on those rows, you can put the first query as a subquery in the FROM clause of the second query. A subquery u...
2007-05-11, 6845👍, 0💬

How To Enter Characters as HEX Numbers
How To Enter Characters as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics 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 charact...
2007-05-11, 6801👍, 0💬

How To Delete All Rows a Table
How To Delete All Rows a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements 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 DELET...
2007-05-11, 6795👍, 0💬

How To Return the Second 5 Rows
How To Return the Second 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you want to display query output in multiple pages with 5 rows per page, and the visitor wants to see the output for the second page, you need to display query output from row 6 to row 10. You can use t...
2007-05-11, 6573👍, 0💬

How To Select Some Rows from a Table
How To Select Some Rows from a Table? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY If you don't want select all rows from a table, you can specify a WHERE clause to tell the query to return only the rows that meets the condition defined in the WHERE clause. The WHERE clause condition is ...
2007-05-11, 6438👍, 0💬

How To Select All Columns of All Rows from a Table
How To Select All Columns of All Rows from a Table? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY The simplest query statement is the one that selects all columns of all rows from a single table: "SELECT * FROM tableName;". The (*) in the SELECT clause tells the query to return all column...
2007-05-11, 6432👍, 0💬

How To Apply Filtering Criteria at Group Level
How To Apply Filtering Criteria at Group Level? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY 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...
2007-05-11, 6213👍, 0💬

SQL Joins
What is the difference between Inner Join and Outer Join? 1. You use INNER JOIN to return all rows from both tables where there is a match. ie. in the resulting table all the rows and colums will have values. In OUTER JOIN the relulting table may have empty colums. Outer join may be either LEFT or R...
2008-09-25, 5670👍, 0💬

How To Use Subqueries with the EXISTS Operator
How To Use Subqueries with the EXISTS Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries 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 (sub...
2007-05-11, 5637👍, 0💬

How To Include Numeric Values in SQL statements
How To Include Numeric Values in SQL statements? - MySQL FAQs - Introduction to SQL Basics 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 -...
2007-05-11, 5551👍, 0💬

How To Count Groups Returned with the GROUP BY Clause
How To Count Groups Returned with the GROUP BY Clause? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the nu...
2007-05-11, 5536👍, 0💬

Can Group Functions Be Mixed with Non-group Selection Fields
Can Group Functions Be Mixed with Non-group Selection Fields? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY 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. Th...
2007-05-11, 5378👍, 0💬

How To Sort Output in Descending Order
How To Sort Output in Descending Order? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY 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...
2007-05-11, 5364👍, 0💬

How To Convert Numeric Values to Character Strings
How To Convert Numeric Values to Character Strings? - MySQL FAQs - Introduction to SQL Basics 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 t...
2007-05-11, 5284👍, 0💬

How To Omit Columns with Default Values in INSERT Statement
How To Omit Columns with Default Values in INSERT Statement? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements If you don't want to specify values for columns that have default values, or you want to specify values to columns in an order different than how they are defined, you c...
2007-05-11, 5240👍, 0💬

1 2 3 4 5 > >>   Sort: Date