Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8928169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:22:30+00:00 2026-06-15T08:22:30+00:00

Possible Duplicate: What is the dual table in Oracle? I have always wondered how

  • 0

Possible Duplicate:
What is the dual table in Oracle?

I have always wondered how does the query like:

select sysdate
from dual;

or

select 8
from dual;

do work.

As I’m used to select statement selects column/s value from a given table. But in the examples
mentioned above table dual DOESN’T have sysdate or just ‘8’ columns….

Could someone explain me how it works?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:22:30+00:00Added an answer on June 15, 2026 at 8:22 am

    You don’t have to select columns. You can select expressions, which can by columns, constant values, function calls, calculations…. So you could select this from an employee table

    select 
      e.nr,  -- column
      upper(e.name) as name, -- Function call to change the name to uppercase.
      e.age + 5 as age, -- expression with calculation with column value. 
      1  -- Just a value. Contains 1  for each row that the query returns.
    from 
      employees e;
    

    Note as name and as age. This is because the column name is lost once an expression contains more that just a column name. In that case, you can specify the name that you want the column to have in the query results. A similar trick is done for the table name itself. The alias e is just a shorthand. This is especially useful when using multiple tables (in a join). In this simple query, the table alias can be omitted altogether.

    dual is just a special table that has 1 row exactly, and one column named dummy. It has many different uses which have been discussed before. From Oracle 23c onwards, from dual is optional, as it has been in MySQL for a while longer. You can simply write:

    select
      1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How does the Google Did you mean? Algorithm work? Suppose you have
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: nth-child for every two table rows I'm trying to work my way
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: JavaScript: why does parseInt(1/0, 19) return 18? Why does parseInt(1/0, 19) evaluate
Possible Duplicate: C# driver development? I would like to know if I can do
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.