Adding or deleting lines in a SQL query
You can add new lines to an SQL query, or delete
lines you no longer need. You can change the query before or after you run
it.
To add lines:
- If you have not saved the query in the database, display the query again
by entering SHOW QUERY on the QMF command line. Or, you can display
the query by pressing the Query function key. If you saved the query in the
database, enter DISPLAY QUERY queryname.
- Move the cursor above the place where you want to add information.
- Press the Insert function key. QMF displays a blank line.
- Type the information on the blank line. For this example, add a condition
to select only employees from department 38.
SELECT NAME, YEARS, SALARY
FROM Q.STAFF
WHERE DEPT=38
ORDER BY NAME
To delete a line:
Move the cursor to the line you want to delete, and press the Delete function
key.
[ Previous Page | Next Page | Contents | Index ]