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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:18:03+00:00 2026-05-25T15:18:03+00:00

I have to create a temp tables…But the problem is if multiple user will

  • 0

I have to create a temp tables…But the problem is if multiple user will use the system there is no way to distinguish between their temporary tables. So I thought of putting an id infront of every table. This will be the unique id.
Any suggestion how to do this?

This unique id is there in my select query :

SELECT TABLE2.ID, TABLE2.NAME, TABLE2.ADDRESS, TABLE2.PHONE, INTO   ##TEMP_TABLE
FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.NAME = TABLE2.NAME
GROUP BY TABLE2.ID,  TABLE2.NAME, TABLE2.ADDRESS, TABLE2.PHONE;

How can I append this ID with temp table?

  • 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-25T15:18:04+00:00Added an answer on May 25, 2026 at 3:18 pm

    Why not just use local temporary tables and not have to worry about it? Just prefix them with a single # mark.

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

Sidebar

Related Questions

I have 2 temp tables that I am populating with a numeric value: CREATE
Our client's database admins have requested that we don't use temp tables within our
I have written a DB2 query to do the following: Create a temp table
I have create name range on sheet A so I need to use this
I use TcxGrid I have create fields on execution time because I have a
I have a number of tables that use the Postgres Partitioning feature. I want
I have been reading about the differences between Table Variables and Temp Tables and
Two temp tables are created and then loaded...Here's the schema. Create table #SH ([date]
I've had this problem a few times and solved it the same way. But
I have several tables where a field is for priority (1 to 5). Problem

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.