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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:51:26+00:00 2026-06-08T21:51:26+00:00

I made a mistake and entered: SELECT * FROM table LIMIT1 instead of SELECT

  • 0

I made a mistake and entered:

SELECT * FROM table LIMIT1

instead of

SELECT * FROM table LIMIT 1 (note the space between LIMIT and 1)

in the CLI of MySQL. I expected to receive some kind of parse error, but I was surprised, because the query returned all of the records in the table. My first thought was “stupid MySQL, I bet that this will return error in PostgreSQL”, but PostgreSQL also returned all records. Then tested it with SQLite – with the same result.

After some digging, I realized that it doesn’t matter what I enter after the table. As long as there are no WHERE/ORDER/GROUP clauses:

SELECT * FROM table SOMETHING -- works and returns all records in table

SELECT * FROM table WHERE true SOMETHING -- doesn't work - returns parse error

I guess that this is a standardized behavior, but I couldn’t find any explanation why’s that. Any ideas?

  • 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-08T21:51:28+00:00Added an answer on June 8, 2026 at 9:51 pm

    Your first query is equivalent to this query using a table alias:

    SELECT * FROM yourtable AS LIMIT1
    

    The AS keyword is optional. The table alias allows you to refer to columns of that table using the alias LIMIT1.foo rather than the original table name. It can be useful to use aliases if you wish to give tables a shorter or a more descriptive alias within a query. It is necessary to use aliases if you join a table to itself.

    From the SQL lite documentation:

    AS keyword optional

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

Sidebar

Related Questions

Mysql mistake (don't laught please) I made a script that generates statistics table for
I imported data from csv files into a MySQL database, but made the mistake
-edit- nevermind, i made a mistake in my select statement. Update was working correctly.
I made a mistake and decided to order a 4S instead of iPhone 4.
I made a mistake with my git repositories(edited files from the main one), and
i made a mistake and i have to split 1 table into 2. i
I have a table which has an auto-increment column and I made a mistake
Please help me finding where I have made mistake? delimiter // CREATE FUNCTION `count_photos_in_gallery`(`tmp_gallery_id`
I made a mistake in a bulk insert script, so now i have duplicate
I made the mistake of defining in my schema a column named desc 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.