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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:47:19+00:00 2026-06-12T21:47:19+00:00

I create the following two tables that only differs the case: tables.sql: CREATE TABLE

  • 0

I create the following two tables that only differs the case:

tables.sql:

CREATE TABLE T1 (C1 INTEGER);
INSERT INTO T1 VALUES (1);
CREATE TABLE "t1" (C1 INTEGER);
INSERT INTO "t1" VALUES (2);
CREATE TABLE T2 (C1 INTEGER, "c1" integer);
INSERT INTO T2 VALUES (3, 4);

Command

db2 -tvf tables.sql

When I want to query the tables, directly from the CLP, I cannot differentiate the two types of case. How can I do a query to table T1 and another to table t1. The same for both columns C1 and c1?

  • 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-12T21:47:20+00:00Added an answer on June 12, 2026 at 9:47 pm

    In order to query those tables from CLP in Windows, you have to do:

    For table T1 (The simplest one):

    db2 select * from T1
    

    or (This is the way in Linux because of the *)

    db2 "select * from T1"
    

    For table t1

    db2 "select * from ""t1"""
    

    For the columns is similar

    db2 select C1 from T2
    

    For the other

    db2 "select ""c1"" from T2"
    

    Make sure that the whole command is involve in quotes. If you issue this command:

    db2 select ""c1"" from T2
    

    It will return C1 instead. The same for this command:

    db2 select * from ""t1""
    

    with T1 being returned.

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

Sidebar

Related Questions

I have the following two tables: CREATE TABLE `table1` ( `ID` int(11) NOT NULL
I have two tables with the following definitions: CREATE TABLE [dbo].[Shows] ( [Id] UNIQUEIDENTIFIER
I have the following table: I am trying to create an SQL query that
I want to create a view from the following two tables: Entry: entry_id entry_date
What is the difference in the following two CREATE TABLE statements? (The first one
I am trying to compare two tables to find rows in each table that
Say I have two tables, user and comment . They have table definitions that
For example I have the following tables resulting from: CREATE TABLE A (Id int,
I have the following SQL statement (SQLite 3.0) which is joining two tables, the
Given the following tables: CREATE TABLE tree ( id serial NOT NULL, name character

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.