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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:42:39+00:00 2026-05-31T00:42:39+00:00

Here is data in my table : id name surname place 1 test1 isdad

  • 0

Here is data in my table :

id      name       surname       place
1       test1         isdad      YES
2       test2       spreda       YES
3       test3          me        NO
4       test4      smallvile     YES

What I’d like to get, all ids where place=’YES’. So Ids are

1
2
4

and the result count is 3. I want to append that number to the end of the results, so the result should look like this:

1
2
4
3
  • 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-31T00:42:40+00:00Added an answer on May 31, 2026 at 12:42 am

    There is almost definitely a better way to do this. That said, you could do:

    SELECT id FROM myTable WHERE place = 'YES'
    UNION ALL
    SELECT COUNT(*) FROM myTable WHERE place = 'YES'
    

    UNION ALL will append the result number as a new row rather than attempting to add it as another column.

    Please don’t do this; the results will be mixed, it stands in stalwart defiance of good software design and will be baffling to anyone who comes along later and has to work on this piece of code.

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

Sidebar

Related Questions

I am looking for some query help here is the following table data Name
Here is a table structure (e.g. test): Field Name Data Type id BIGINT (20)
My html is like this <div id=rsContainer> <table id=rsTable><!-- DATA HERE --></table> </div> and
Here is my table and data of these tables Table name: Code CID Code
Data: Here is sample table(TableA) data ID StartTime EndTime 1 2012-03-22 06:00:00.000 2012-03-22 06:30:00.000
I try to show my table data type in datagridview vb.net. Here is the
Here is the sample data for test table I have [childId] [parentId] [present] 1
Here is sample data <table class=sparql border=1> <tr> <th>abstract</th></tr> <tr> <td> Cologne is Germany&#39;s
I have encountered a problem of placing data into the Table View. Here is
Here's my table with some sample data a_id | b_id ------------ 1 225 2

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.