How to insert a user input into a sql script field

Quick question,

I’ve been learning a few functions via W3school on SQL, now I have an idea of what I want to achieve, but would like some insight on how I could achieve it.

Example.

Using an SQL script, I would want to query some information from a particular table, the information is the user input I want it to find.

For Example.

If I wanted to look up a particular ticket by using the ticket number.
Id want to ask the user who is running the script, to insert ticket number to search for, once the user inputs a number, it then executes the script which looks for that ticket number within a specific database, then bring up the results or do something with the results.

is this possible to do?

Yes, look at the recent topic on creating users with SQL.
Many functions can be done with just script and API helpers, other would currently still need SQL directly. Would expect when API is finished there would be helper for virtually everything.