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

  • Home
  • SEARCH
  • 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 7848441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:12:17+00:00 2026-06-02T18:12:17+00:00

So I have a table and I want to create another table using CREATE

  • 0

So I have a table and I want to create another table using “CREATE VIEW” from sql.
I need to make a copy of the table that I am working with so I can use it 2x. My sql query would have to be like this:

SELECT A.time AS Start, B.time AS Stop
FROM time A, time B
WHERE A.id+1=B.id
AND A.bool=1
AND B.bool=0

my initial table is:

    String sql="create table "+TABLE+" ( "+C_ID+" INTEGER PRIMARY KEY AUTOINCREMENT, "
+C_TIME+" TEXT, "+C_BOOL+" NUMERIC)";

so anyone has any ideea where (in my code) I can create the view and how do I query it in android?

I can provide code if needed

Thank you 🙂

  • 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-02T18:12:20+00:00Added an answer on June 2, 2026 at 6:12 pm

    Based on this, you would create the view with the following statement:

    CREATE VIEW view_name AS 
        SELECT A.time AS Start, B.time AS Stop
        FROM time A, time B
        WHERE A.id+1=B.id
            AND A.bool=1
            AND B.bool=0
    

    You can create it right after you create the “base” table.

    You can query it just like you would query any other table.

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

Sidebar

Related Questions

I have a huge table from one mysql db, I want to create a
I have a large table of birthdays that I want to convert from a
I have data in 2 tables, and I want to create a report. Table
I have created a table in postgreSQL. I want to look at the SQL
I have a UIButton that is created inside of each table cell. I want
i have users table and i have posts table i want select from users
I want to create a tree table to display files using backbone.js + jQuery.
Say that I have a table with a bunch of records, which I want
I have a question about updating table through t-sql. The client may want to
I currently have a table with all the data, using this data i want

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.