1 2 3 4 5 6 > >>   Sort: Rank

Unicode Character String Literals in SQL Server Transact-SQL
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are multi-byte characters. They are very hard to be entered as string literals, because it requires: The SQL client tool to support Unicode characters. The command line tool 'sqlcmd' does not support Unicod...
2019-12-05, 2368👍, 1💬

💬 2019-12-05 gopala krishna: gopala krishna

Concatenate Two Text Values in Oracle
How To Concatenate Two Text Values in Oracle? There are two ways to concatenate two text values together: CONCAT() function. '||' operation. Here is some examples on how to use them: SELECT 'FYI' || 'Center' || '.com' FROM DUAL; FYICenter.com SELECT CONCAT('FYICenter','.com') FROM DUAL; FYICenter.co...
2019-12-02, 836👍, 0💬

Convert Times to Character Strings in Oracle
How To Convert Times to Character Strings in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(SYSDATE, 'HH:MI:SS') FROM DUAL; 04:49:49 SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS.FF') FROM DUAL; -- Error: SYSDATE has no fractional se...
2019-12-02, 647👍, 0💬

What Is NULL Value in Oracle
What Is NULL Value in Oracle? NULL is a special value representing "no value" in all data types. NULL can be used on in operations like other values. But most operations has special rules when NULL is involved. The tutorial exercise below shows you some examples: SET NULL 'NULL'; -- Make sure NULL i...
2019-12-02, 640👍, 0💬

Convert Character Strings to Times in Oracle
How To Convert Character Strings to Times in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(TO_DATE('04:49:49', 'HH:MI:SS'), 'DD-MON-YYYY HH24:MI:SS') FROM DUAL; -- Default date is the first day of the current month 01-MAY-...
2019-12-02, 613👍, 0💬

Use NULL as Conditions in Oracle
How To Use NULL as Conditions in Oracle? If you want to compare values against NULL as conditions, you should use the "IS NULL" or "IS NOT NULL" operator. Do not use "=" or "<>" against NULL. The sample script below shows you some good examples: SELECT 'A' IS NULL FROM DUAL; -- Error: ...
2019-12-02, 605👍, 0💬

Group Functions Used with Non-group Selection Fields in Oracle
Can Group Functions Be Mixed with Non-group Selection Fields in Oracle? 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 ...
2019-11-21, 625👍, 0💬

Divide Query Output into Groups in Oracle
How To Divide Query Output into Groups in Oracle? 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 the column will be considered as a single group. When the GROUP BY clause is speci...
2019-11-21, 621👍, 0💬

Use Group Functions in the SELECT Clause in Oracle
How To Use Group Functions in the SELECT Clause in Oracle? If group functions are used in the SELECT clause, they will be used on the rows that meet the query selection criteria, the output of group functions will be returned as output of the query. The following select statement returns 4 values ca...
2019-11-21, 580👍, 0💬

Count Duplicated Values in a Column in Oracle
How To Count Duplicated Values in a Column in Oracle? 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 re...
2019-11-21, 565👍, 0💬

Apply Filtering Criteria at Group Level in Oracle
How To Apply Filtering Criteria at Group Level in Oracle? 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. The following script gives you a good HAVING example: SQL> SELECT dep...
2019-11-21, 524👍, 0💬

Downloading and Installing SQL Server Sample Scripts in SQL Server
How to download and install SQL Server 2005 Sample Scripts in SQL Server? If you want to learn from sample scripts provided by Microsoft, you should follow this tutorial to download and install them: 1. Go to the SQL Server 2005 Samples and Sample Databases download page. 2. Go to the x86 section in...
2019-11-08, 1559👍, 2💬

💬 2019-11-08 FYIcenter.com: @Nana, please follow AdventureWorksLT - Downloading and Installing the Sample Database in SQL Server tutorial.

💬 2019-10-31 Nana Jacob: Please i need to download AdventureWorksLT

Query with an Inner Join in Oracle
How To Write a Query with an Inner Join in Oracle? If you want to query from two tables with an inner join, you can use the INNER JOIN ... ON clause in the FROM clause. The following query returns output with an inner join from two tables: employees and departments. The join condition is that the de...
2019-10-27, 700👍, 0💬

Use Multiple Columns in GROUP BY in Oracle
Can Multiple Columns Be Used in GROUP BY in Oracle? You can use multiple columns in the GROUP BY clause as shown in the following example. It returns how many employees are having the same salary in each department: SQL> SELECT department_id, salary, count(*) 2 FROM employees GROUP BY departm...
2019-10-27, 675👍, 0💬

Use Group Functions in ORDER BY Clause in Oracle
Can Group Functions Be Used in the ORDER BY Clause in Oracle? If the query output is aggregated as groups, you can sort the groups by using group functions in the ORDER BY clause. The following statement returns how many employees are having the same salary in each department. The group output is so...
2019-10-27, 665👍, 0💬

Define and Use Table Alias Names in Oracle
How To Define and Use Table Alias Names in Oracle? When column names need to be prefixed with table names, you can define table alias name and use them to prefix column names as shown in the following select statement: SQL> SELECT e.first_name, e.last_name, d.department_name FROM employees e ...
2019-10-27, 564👍, 0💬

Ways to Join Two Tables in a Single Query in Oracle
How To Join Two Tables in a Single Query in Oracle? Two tables can be joined together in a query in 4 ways: Inner Join: Returns only rows from both tables that satisfy the join condition. Left Outer Join: Returns rows from both tables that satisfy the join condition, and the rest of rows from the fi...
2019-10-27, 504👍, 0💬

Left Outer Join with the WHERE Clause in Oracle
How To Write a Left Outer Join with the WHERE Clause in Oracle? If you don't want to use the LEFT OUTER JOIN ... ON clause to write a left outer join, you can use a special criteria in the WHERE clause as "left_table.column = right_table.column(+)". The select statement below is an example of a left...
2019-10-18, 655👍, 0💬

Query with a Left Outer Join in Oracle
How To Write a Query with a Left Outer Join in Oracle? 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: departments and employees. The join conditi...
2019-10-18, 653👍, 0💬

Query with a Full Outer Join in Oracle
How To Write a Query with a Full Outer Join in Oracle? If you want to query from two tables with a full outer join, you can use the FULL OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a full outer join from two tables: departments and employees. The join conditi...
2019-10-18, 649👍, 0💬

Inner Join with the WHERE Clause in Oracle
How To Write an Inner Join with the WHERE Clause in Oracle? 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: SQL> SELECT d.department_name, e.first_name, e.last_name 2 FROM...
2019-10-18, 617👍, 0💬

Query with a Right Outer Join in Oracle
How To Write a Query with a Right Outer Join in Oracle? 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: departments and employees. The join con...
2019-10-18, 587👍, 0💬

Name Query Output Columns in Oracle
How To Name Query Output Columns in Oracle? 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: SQL> SELECT department_id...
2019-09-27, 764👍, 2💬

💬 2019-09-19 Aninda mahadev: Good Tutorial!!!

Use Subqueries with the EXISTS Operator in Oracle
How To Use Subqueries with the EXISTS Operator in Oracle? 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 employees table that t...
2019-09-27, 681👍, 0💬

1 2 3 4 5 6 > >>   Sort: Rank