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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:24:05+00:00 2026-05-28T08:24:05+00:00

This concerns sql show queries. The following query below works the issue is it

  • 0

This concerns sql show queries. The following query below works the issue is it seems I must tell mysql which field names I don’t want rather than those I do (which is preferred).

e.g. (working)

SHOW FIELDS FROM users WHERE Field != 'uid' AND Field != 'fk_Utype'

The above executes perfectly as expected, stipping off both ‘uid’ and ‘fk_Utype’ from the result set. However when querying by which columns I only want (like a traditional Select query) listing the column names needed does not behave as expected.

SHOW FIELDS FROM users WHERE Field = 'firstName' AND Field = 'lastName'

I expected the above query to simply return the two specified columns. However, the query instead results in an empty result set (the columns do exist in that table and appear when the above query is executed). Clearly I’m not listing the desired column names correctly. As in a Select statement the syntax it simply ‘Select col1, col2’ but this syntax is incorrect in a SHOW query (though I may well be mistaken).

  • 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-28T08:24:06+00:00Added an answer on May 28, 2026 at 8:24 am
    SHOW FIELDS FROM users WHERE Field = 'firstName' OR Field = 'lastName'
    

    AND means both conditions must be true whereas OR means either condition can be true.

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

Sidebar

Related Questions

This question concerns generics and types as well as datatables. The following snippet is
This concerns Intellij from 9 to 11. In the IDEA window On the bottom
This concerns iPhoneOS-sdk-3.2 I am having difficulty changing the border color of a grouped
This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit
I'm getting this error when running an SSIS package through SQL Agent Failed to
With PHP I'm trying to run a SQL query and select normal columns as
This questions concerns the use of the formula field in a static mapping block
Is there a way to have a SQL Reporting Services (2005) dynamically show or
At the moment my code (PHP) has too many SQL queries in it. eg...
I am currently developing a WPF client application which uses Linq-to-SQL for the typed

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.