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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:46:57+00:00 2026-05-24T12:46:57+00:00

I read some articles but really didn’t understand what does select 1 from do?

  • 0

I read some articles but really didn’t understand what does select 1 from do? Someone says “you should use select 1 instead of select *“. Here is an example table:

cust_id     cust_name       cust_address

1000000001  Village Toys    Mapl
1000000002  Kids Place      South
1000000003  Fun4All         Sunny
1000000004  Fun4All         Riverside
1000000005  The Toy Store   53rd

What will the result be when I write select 1 from customer_table what does this statement do?

  • 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-24T12:46:58+00:00Added an answer on May 24, 2026 at 12:46 pm
    select 1 from table
    

    will return a column of 1’s for every row in the table. You could use it with a where statement to check whether you have an entry for a given key, as in:

    if exists(select 1 from table where some_column = 'some_value')
    

    What your friend was probably saying is instead of making bulk selects with select * from table, you should specify the columns that you need precisely, for two reasons:

    1) performance & you might retrieve more data than you actually need.

    2) the query’s user may rely on the order of columns. If your table gets updated, the client will receive columns in a different order than expected.

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

Sidebar

Related Questions

I read some microsoft articles.They explained that WCF uses DataContractSerializer for serialization.But the articles
I have read some articles on POCO in the enttity framework but still don't
I've read some of the articles on MSDN but they're not quite what I
I read some articles about SqlCacheDependency. I think it is a really cool way
I read some articles about Comet tech. All of them mentioned that the long-life
I did some timing tests and also read some articles like this one (last
I just got Delphi 2009 and have previously read some articles about modifications that
So far I've read some blog articles about cloud computing and services for hosting
I am new to ASP.net MVC architecture. I have read in some articles that
I have read from some article that say's Apple doesn't approve the application which

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.