Basic Selects - Today's Code Basic Selects Everything(all rows/records and columns/fields SELECT FROM tblEmployee Mote's Notes Alphabetized List of

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Today's Code - Basic Selects Mote’s Notes 2/23/2011 -- Everything (all rows/records and columns/fields) SELECT * FROM tblEmployee -- Alphabetized List of Accountants SELECT * FROM tblEmployee WHERE JobTitle = 'Accountant' ORDER BY LastName, FirstName -- Annual Salaries of Accountants SELECT FirstName, LastName, AnnualSalary FROM tblEmployee WHERE JobTitle = 'Accountant' ORDER BY LastName, FirstName -- Monthly Salaries of Accountants SELECT FirstName, LastName, AnnualSalary/12 FROM tblEmployee WHERE JobTitle = 'Accountant' ORDER BY LastName, FirstName -- Headings SELECT FirstName, LastName, AnnualSalary/12 AS MonthlySalary FROM tblEmployee SELECT FirstName AS [First Name], LastName AS [Last Name], AnnualSalary/12 AS [Monthly Salary] FROM tblEmployee -- Computed Fields SELECT FirstName + ' ' + LastName AS FullName, ROUND( AnnualSalary/12 , 2) AS MonthlySalary FROM tblEmployee
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
SELECT FirstName + ' ' + LastName AS FullName, LOWER( LEFT(FirstName,1) + LEFT(LastName,1) ) AS Initials FROM tblEmployee
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/16/2011 for the course MIS 325 taught by Professor Mote during the Spring '08 term at University of Texas at Austin.

Page1 / 4

Basic Selects - Today's Code Basic Selects Everything(all rows/records and columns/fields SELECT FROM tblEmployee Mote's Notes Alphabetized List of

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online