CSE 385 Chapter 3: Retrieving from Single Table

56 views3 pages

Document Summary

3 - how to retrieve data from a single table. To check dates in where: invoicedate between 2016-01-01" and. * in select clause retrieves all columns in table. Only do this when you need all for performance reasons. Separate column names with commas to retrieve specific columns. Also calculate values with arithmetic in select statement (invoicetotal - payments. To type single quote using escape: select vendorname + ""s address. Older versions used [invoice number] = invoicenumber. Arithmetic (+, -, *, /, %) operators evaluated in order of precedence. Functions: they perform operations and return value. Left(columnname, n)- returns n characters starting from left of data in the. Convert(totype, columnname, format)- converts the data in one column to another type. Distinct keyword: include after select word to eliminate duplicate rows. Automatically sorts by first column without using order by. Top clause: gives specific number of rows from beginning of result set.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents