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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:34:30+00:00 2026-05-25T20:34:30+00:00

This question is all about laziness… I’d like to do something like this: select

  • 0

This question is all about laziness… I’d like to do something like this:

select some_func(some_col), * from my_table

So that I don’t have to do this:

select some_func(some_col), col_1, col_2... col_ad_infinitum from my_table

Is there any way to make the first query work? This is the error I get when I run it:

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* from my_table' at line 1
  • 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-25T20:34:31+00:00Added an answer on May 25, 2026 at 8:34 pm

    Do you mean that in MySQL your first query:

    SELECT some_func(some_col), * 
    FROM my_table
    

    produces this error?:

    Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘*’ at line 1


    You can change your code into (this results in no errors!):

    SELECT *, some_func(some_col) 
    FROM my_table
    

    or into this, if you want to have the calculated columns first:

    SELECT some_func(some_col), t.* 
    FROM my_table AS t
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, first of all sorry about this question it must be pretty straight forward
Unlike the other posts about the task delete all tables, this question is specifically
first of all this is my third question about web services here and i
This question is all about performance and I would appreciate if the answers are
This question is all about solving a SslPolicyError.RemoteCertificateNotAvailable error. I have developed a TCP
I'm developing Wordpress theme for my friend's company, but this question is all about
Hey all -- this question is specifically about a gender validation, but I'm interested
This question is not about timing something accurately on Windows (XP or better), but
I went through a lot of answers for this question.But it's all about single
Note: This question IS programming related! It's all about better code and better software

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.