Beginning SQL

Beginning SQL Beginning SQL

marjan.fesb.hr
from marjan.fesb.hr More from this publisher
20.07.2013 Views

Appendix A Exercise 3 Solution First, decide which columns you want. In this case, you want the LastName and FirstName columns from the MemberDetails table: SELECT LastName, FirstName FROM MemberDetails Now you need to ensure that only members whose date of joining was on or before December 31, 2004, are included in the results set. Use a WHERE clause and specify that the DateOfJoining column be before (or less than) that date: SELECT LastName, FirstName FROM MemberDetails WHERE DateOfJoining

Appendix A<br />

Exercise 3 Solution<br />

First, decide which columns you want. In this case, you want the LastName and FirstName columns<br />

from the MemberDetails table:<br />

SELECT LastName, FirstName<br />

FROM MemberDetails<br />

Now you need to ensure that only members whose date of joining was on or before December 31, 2004,<br />

are included in the results set. Use a WHERE clause and specify that the DateOfJoining column be before<br />

(or less than) that date:<br />

SELECT LastName, FirstName<br />

FROM MemberDetails<br />

WHERE DateOfJoining

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

Saved successfully!

Ooh no, something went wrong!