Read this SQL tutorial to learn when to use SELECT, JOIN, subselects and UNION to access multiple tables with a single statement. It’s sometimes difficult to know which SQL syntax to use when ...
What you want to do is insert the data in the database with the ' replaced with '' . This escapes the apostrophe and won't mess up the query.
A common SQL habit is to use SELECT * on a query, because it’s tedious to list all the columns you need. Plus, sometimes those columns may change over time, so why not just do things the easy way? But ...
The ability to write parts of SQL queries in natural language will help developers speed up their work, analysts say.