NULL vs Empty string in oracle

Learn about NULL value and an empty string behavior in oracle database with example queries. NULL means no-value(nothing). An empty string(”) treated as NULL value Let’s create a table suppliers_tbl with the following table definition. Next, we’ll insert following records into this table. The first statement inserts a record with a supplier_name that is null, … Read more NULL vs Empty string in oracle

Pseudo columns in Oracle

Learn about the logical columns that exists in oracle database with example queries. Pseudo columns are nothing but logical columns which behaves like a physical columns in database. Means Pseudo columns behaves like a table columns but is not actually stored in the table. You can select from pseudo-columns, but you cannot insert, update, or … Read more Pseudo columns in Oracle

Remove duplicate records using dynamic SQL

Learn how to remove duplicate records present in a table with standard sql queries and also dynamic sql with example queries. For base table reference please click on the given link. To implement removing duplicate rows using dynamic SQL we just want to have the knowledge about Listagg, Execute Immediate concepts. Below are example queries … Read more Remove duplicate records using dynamic SQL

Row limiting clause TOP ROWNUM LIMIT FETCH

Learn how to fetch top N rows using SQL TOP, ROWNUM, LIMIT, FETCH clauses with example queries. Row Limiting clause is useful to limit the number of records to return on large tables with thousands of records. TOP, ROWNUM, LIMIT, FETCH are Row Limiting clauses used to specify the number of records to return. TOP … Read more Row limiting clause TOP ROWNUM LIMIT FETCH

SQL practice test queries on Employee data in relational table

Learn how to write SQL queries for questions below the data. Table Name: Employee EMPNOENAMEMGRHIREDATESALDEPTNAME 1SMITH312/17/1980800.00BANKING 2ALLEN42/20/19811600.00INSURANCE 3WARD 2/22/19811250.00BANKING 4JONES 4/2/19812975.00INSURANCE 5MARTIN49/28/19811250.00INSURANCE 6BLAKE75/1/19812850.00SERVICES 7CLARK 6/9/19812450.00SERVICES 8SCOTT412/9/19823000.00INSURANCE 9KING311/17/19815000.00BANKING 10TURNER49/8/19811500.00INSURANCE 11ADAMS31/12/19831100.00BANKING 12JAMES712/3/1981950.00SERVICES 13FORD412/3/19813000.00INSURANCE 14MILLER41/23/19821300.00INSURANCE Table Name: Incentives EMPIDINCENTIVE_DATEINCENTIVE_AMOUNT 12/1/20195000.00 22/6/20193000.00 32/7/20194000.00 11/1/20194500.00 21/4/20193500.00 Basic questions for Practice Display all the information of the Employee table 2.Display unique Department names from … Read more SQL practice test queries on Employee data in relational table

Extract function with DATE TIME data type values

Learn how to extract a DAY,MONTH,YEAR,HOUR,MINUTE AND SECOND from a date time data type values. EXTRACT function extracts a date or a timestamp and returns the year, month, day, hour, minute, second, or time zone. EXTRACT extracts a YEAR, MONTH, and DAY from a DATE data type. EXTRACT extracts a TIMEZONE_HOUR and TIMEZONE_MINUTE from TIME_STAMP … Read more Extract function with DATE TIME data type values

Oracle DATE data type

Learn how to convert a date in string format to a string Date format using TO_DATE function and Date literal formats. Also Learn how to get the current operating system time and current session DB time with example queries. DATE– data type used to store the date(day,month,year) and time(Hours,minutes,seconds) values. Date format of date data … Read more Oracle DATE data type