Simple Queries
The Extract All TuplesAll Tuples and All AttributesExtract all data in the table which includes all rows and columns. SELECT * FROM table-name; All Tuples with a Subset of Attributes SELECT attr1, attr2, ..., attrN FROM table-name; Extract a Subset of TuplesAll AttributesExtract a subset of tuples from the table where each tuple includes all of the attributes. SELECT * FROM table-name WHERE condition; Subset of Attributes SELECT attr1, attr2, ..., attrN FROM table-name WHERE condition; Sorting the Results SELECT * FROM table-name WHERE condition ORDER BY attr-list;
|