Select every column from a table

To retrieve all the columns from a table, use an asterisk (*) instead of naming the columns. The format of a SELECT statement used for this selection is:

SELECT * FROM tablename

tablename is the name of the table or view you are searching. For example, this statement produces all the columns in Q.ORG:

SELECT * FROM Q.ORG

This query produces all the columns but only the rows where the department number is 10:

SELECT *
FROM Q.STAFF
WHERE DEPT = 10
[ Previous Page | Next Page | Contents | Index ]