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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T10:58:57+00:00 2026-05-28T10:58:57+00:00

I don’t normally deal in databases (I’ve managed a few small ones for web

  • 0

I don’t normally deal in databases (I’ve managed a few small ones for web apps I wrote for me and my friends) So I’m going to verify that I understand how everything works, before asking my question.

  1. SQL is a program that “does” databases. It manages all the tables and the schemes and the links, and it does most everything in response to commands it receives. You could type these commands in by hand, or have a script you write with commands in them, or have another program send these commands to SQL, but the commands haven’t really changed.

  2. SQL Injection occurs when a web application Takes input received from the user, and sends it to SQL without cleaning it up first. If the end-user is wiley enough, SQL will see commands that it was supposed to see as Data to be stored in a table somewhere, resulting in travesty.

  3. Typical SQL injection prevention involves sanitizing your user input, that is, stripping out any characters that would make SQL think a command was being sent, instead of data.

Now, My question:

Why does SQL not handle this for us? Why does SQL, on each command, not look for the first “, and the last “, and ignore any “s in between? (I don’t think “‘s are a part of standard SQL command syntax, it’s been a while, but if not, change could happen) It would, of course, prevent you from sending multiple commands simultaneously (as the 2nd/3rd commands would be ignored) but on a “I send 1 command at a time” rule, this pretty much ignores any shenanigans the end-user might try to pull.

I’m sure someone else has thought of this, and dismissed it as not working for some reason or another. But I don’t know enough to understand why, and I’d like to.

  • 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-28T10:58:57+00:00Added an answer on May 28, 2026 at 10:58 am

    “SQL” doesn’t handle it for us because “SQL” isn’t a program, it’s a language: Structured Query Language. The applications we build to interface with databases use the language SQL as a means to retrieve information from the database.

    The applications we build also use some sort of API (application programmer’s interface) to talk to the database and that API passes the SQL in to the database. (Actually to the RDBMS or Relational Database Management System, which is the “program” you might be thinking of like MySQL, Oracle, MS SQL Server, or PostgreSQL)

    There are some smarter APIs which do in fact handle the parameter sanitizing on their own, if the API offers access to prepared statements or stored procedure execution.

    Potential trouble with SQL injection comes when the API doesn’t use prepared statements or parameterized queries (or the developer elects not to use them) and instead directly constructs statements in the SQL language to pass to the database. The API’s job in this instance is simple: Just take the string handed from the application and pass it to the database. Because the SQL statement itself takes no input (remember, it is just a string), it has to be up to the developer to make sure it doesn’t contain harmful information.

    More sophisticated APIs which offer prepared statements or parameterized queries do take input and translate the input values into placeholders in the SQL statement, either passing the information natively to the RDBMS to process the parameters and prepared statement, or emulating that action in the application code, before passing a plain SQL string to the RDBMS; part of that translation usually involves sanitizing the values against harmful characters.

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

Sidebar

Related Questions

Don't know whats exactly going on, but it's definitely killing my time for nothing.
Don't ask me how but I managed to get accidentally the following remote branches
Don't worry, I'm not going to ask that question, yet again... I am wanting
Don't know why I can't reply to people on here with only a small
Don't you hate it when you have class Foobar { public: Something& getSomething(int index)
Don't let below code scare you away . The question is really simple, only
Don't be scared of the extensive code. The problem is general. I just provided
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
Don't really know how to formulate the title, but it should be pretty obvious
Don't know how to google for such, but is there a way to query

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.