12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Retrieving Data With QueriesSee Also:■■<strong>Oracle</strong> Database Globalization Support Guide to learn about nationalcharacter sets<strong>Oracle</strong> Database <strong>SQL</strong> Reference to learn about character literals6.2.3 Using a Column Alias to Change Headings When Selecting DataWhen displaying the result of a query, <strong>SQL</strong> normally uses the name of the selectedcolumn as the column heading. You can change a column heading by using a columnalias to make the heading more descriptive and easier to understand.You can specify the alias after the column name in the SELECT list using a space as aseparator. If the alias contains spaces or special characters (such as # or $), or if it iscase-sensitive, enclose the alias in double quotation marks (" ").Example 6–3 shows the use of a column alias to provide more description for eachheading of the columns selected in a query.Example 6–3Using a Column Alias-- the following retrieves the data in columns employee_id, last_name, first_name-- and provides column aliases for more descriptive headings of the columnsSELECT employee_id "Employee Id number", last_name "Employee last name",first_name "Employee first name" FROM employees;6.2.4 Restricting Data Using the WHERE ClauseThe WHERE clause uses comparison operators to identify specific rows in a table. Whenused with the SELECT statement, you can selectively retrieve rows from a table ratherthan retrieving all rows of a table.Comparison operators include those listed in Table 6–1.Table 6–1OperatorComparison OperatorsDefinition=, !=, test for equal, not equal, not equal>, >=,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!