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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:49:59+00:00 2026-06-09T08:49:59+00:00

I have a question, in a T-SQL setting which is faster and better and

  • 0

I have a question, in a T-SQL setting which is faster and better and futureproof?

Is it easier to have a lookup table with IDs and status entries as so

ID | Status
-------------
01 | Success
02 | Failure
03 | Processing

Or is it better to just enter the status values in per row?

How does this effect writing queries, is it good relational database design to use a lookup table rather than just entering a status into rows? Is one faster than the other?

I feel that lookup tables are the way to go, but I’m not seeing that so much in some databases.

  • 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-09T08:50:13+00:00Added an answer on June 9, 2026 at 8:50 am

    I personally would use a separate status table for those items. Then you will use a foreign key between your main table and the separate status table. As far as querying you will just use a JOIN to include the actual status name.

    SELECT *
    FROM yourTable t
    LEFT JOIN yourStatus s
        t.sid = s.id
    

    I think it allows for more flexibility, in the event your status names change you are only changing the values in your separate table rather than performing an UPDATE against your main table.

    Your table structure could be similar to this:

    MainTable
    id int PK,
    sid int FK - to status table
    col3,
    col4...
    
    Status Table
    id int PK - 
    name varchar(50)
    IsActive bit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an SQL question which may be basic to some but is confusing
I have this question in which I have a SQL Server Compact Edition database
I have a very large (millions of rows) SQL table which represents name-value pairs
I have a question about SQL Server indexes. I'm not a DBA and assume
I have a SQL question that i need to ask the experts. To be
I have quick question for you SQL gurus. I have existing tables without primary
I have a small sql question for you. I have two queries: SELECT tbl_CostPrevisions.Month,
I have a question on Date difference in (My)Sql with c#. In my database,
I have a seemly simple question with SQL that I am having trouble figuring
i have a general question about how sql server evaluates the joins.The query is

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.