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 6969659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:36:34+00:00 2026-05-27T16:36:34+00:00

Lets consider a simple table say products in Oracle (I tried on Oracle 9i).

  • 0

Lets consider a simple table say products in Oracle (I tried on Oracle 9i). I’m creating this table with the following CREATE statement.

CREATE TABLE products

("prod_id" varchar2(7) primary key, "product_name" varchar2(30) NOT NULL);

It is to be noted specially that I’m enclosing the column names within double quotation marks "" as not usually we do. It would obviously work and the products table would be created with those two columns with the specified CONSTRAINTS.


Now, lets insert some rows into this table using the following INSERT INTO command.

INSERT INTO products VALUES('P0001', 'Nokia-N97');
INSERT INTO products VALUES('P0002', 'Nokia-1208');
INSERT INTO products VALUES('P0003', 'Nokia-1115');

Would insert three rows into the products table.


To make sure that these rows have indeed inserted or not, we can issue a SELECT statement as follows.

SELECT * FROM products;

Would work just fine and display three rows we inserted.


Now, the actual question here. When we issue the following SELECT statement,

SELECT prod_id, product_name FROM products;

would not work even though we didn’t make any mistake in this SQL. Oracle would report instead that such columns don’t exist. Why does this happen? There must be very specific reason behind it, I think.

I’m sure that enclosing column names unnecessarily within double quotation marks as I have just done may not be the best practice but just a question occurred to me.

  • 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-05-27T16:36:35+00:00Added an answer on May 27, 2026 at 4:36 pm

    Against common believe, Oracle is case sensitive in column and table names. It just converts everything to upper case by default.

    But if you use names in double quotes, you tell Oracle to create the column in the exact spelling you provided (lower case in the CREATE statement).

    Since in the SELECT statement, you don’t use quotes, the names are converted to upper case and are therefore not equal to the lower case names in the CREATE statement.

    So this should work:

    SELECT "prod_id", "product_name" FROM products;
    

    If you don’t know how column or table names are specified, you can look it up in the data dictionary. You will find lower case column names for your product table, but upper case table name, since it wasn’t quoted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my question lets consider the following sample table data: ProductID    ProductName    Price   Category 1                Apple                 5.00       Fruits
Lets consider the following linq statement. var ctx = new MoviesContext(); var movies =
Consider the following database schema: create table UserGroup ( id int not null auto_increment,
Consider this scenario. I have an object, lets call it.... Foo. Foo raises a
Consider the following simple HTML: <div id=navcontainer> <a href=#><img alt= src=Img1.jpg /></a> <a href=#><img
Let's consider the following simple expressions in Java. char c='A'; int i=c+1; System.out.println(i =
I just want to know one simple thing in Java. Let's consider the following
Let's consider the following scenario: I've a master table with a detail table. The
Let's consider this table: [name] [type] Ken Anderson 1 John Smith 2 Bill Anderson
Let's consider this scenario: a freshly create windows form application in which I created

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.