Technology – What Are The SQL Minus and Except Clauses

Structured Query Language (SQL) is the de-facto query language used in most database management systems (DBMS) such as Oracle and Microsoft SQL Server. This domain-specific language is used in programming to query and return the desired data from a database. We use SQL to write queries that declare what data to expect from a dataset … More Technology – What Are The SQL Minus and Except Clauses

SQL Server Length Function Equivalent

The purpose of the Length function in SQL The SQL LENGTH function returns the number of characters in a string. The LENGTH function is available in many Database Management Systems (DBMS). The LENGTH Function Syntax LENGTH(string) LENGTH Function Notes If the input string is empty, the LENGTH returns 0. If the input string is NULL, … More SQL Server Length Function Equivalent

Oracle SQL Date Formatting Examples

Below is a SQL of various examples of Oracle date formats, which I have found to be a useful reference. Select SYSDATE, TO_CHAR(SYSDATE,’YYYY-MM-DD AD’) AS ANNO_DOMINI, TO_CHAR(SYSDATE,’YYYYMMDD’) AS SORT_PATTERN1, TO_CHAR(SYSDATE,’YYYY/MM/DD’) AS DATE_PATTERN1, TO_CHAR(SYSDATE,’DD/MM/YYYY’) AS DATE_PATTERN2, TO_CHAR(SYSDATE,’DD/MON/YYYY’) AS DATE_PATTERN3, TO_CHAR(SYSDATE,’DD-MON-YY’) AS DATE_PATTERN4, TO_CHAR(SYSDATE,’CC’) AS CENTURY, TO_CHAR(SYSDATE,’YYYY’) AS FOUR_DIGIT_YEAR, TO_CHAR(SYSDATE,’YY’) AS YEAR_OF_CENTURY, TO_CHAR(SYSDATE,’J’) AS JUALIAN_DATE, TO_CHAR(SYSDATE,’Q’) AS … More Oracle SQL Date Formatting Examples

Technology – What is the difference between left join and left outer join in SQL

If you’re confused between a LEFT JOIN and a LEFT outer JOIN in SQL, you’re not alone. There are plenty of examples that explain both. In this article, we’ll explore LEFT JOIN, which combines the records from table1 with any matched records in table2, and OUTER JOIN, which combines records from both tables. RIGHT joins … More Technology – What is the difference between left join and left outer join in SQL