From the course: Oracle Database 12c: Basic SQL
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
The special Oracle DUAL table - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
The special Oracle DUAL table
- [Instructor] The dual table in Oracle is a special table created during installation of the Oracle database, and it's especially useful when we want to retrieve constant literal strings from the database without selecting any actual database data or experiment with certain SQL functions. So for example, say that you want to return the hello world string from an Oracle database. Without specify a from clause in your SQL statement, unlike other database engines, the following query will fail in Oracle telling us that the from keyword was not found. Luckily for us, dual comes to the rescue. Simply typing from dual and running the query again will return us the desired output. We can also use dual in combination of certain SQL functions. So for example, I can type upper hello world from dual, and my query will return an uppercase value for hello world. The dual table itself contains a single row. That's why when using dual as part of SQL queries to select values by default will return a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Introduction to functions1m 39s
-
(Locked)
Using SUBSTRING, LENGTH, and CONCAT2m 50s
-
(Locked)
Using LENGTH1m 4s
-
(Locked)
Using CONCAT4m 48s
-
(Locked)
Using LOWER and UPPER2m 44s
-
(Locked)
Using INSTR4m 32s
-
(Locked)
Using RPAD and LPAD3m 31s
-
(Locked)
Using TO_CHAR to convert numbers1m 34s
-
(Locked)
Using TO_CHAR to format DATE values2m 59s
-
(Locked)
Using TO_CHAR to filter DATE values1m 57s
-
(Locked)
The special Oracle DUAL table1m 18s
-
(Locked)
Using ROUND1m 15s
-
(Locked)
Using TRUNC1m 36s
-
(Locked)
Using SYSDATE1m 59s
-
(Locked)
Using SYSTIMESTAMP1m 37s
-
(Locked)
Using MONTHS_BETWEEN3m 2s
-
(Locked)
Using ADD_MONTHS1m 17s
-
-
-
-
-
-