SQL1 - CS105 Lab 2 - SQL Queries Announcements: Online Quiz...

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

View Full Document Right Arrow Icon
CS 105 - Spring 2008 1 CS105 Lab 2 - SQL Queries Announcements: Online Quiz 2  is available and is due on Tuesday,  January 29 th  at midnight.  MP1  has been posted, and is due Saturday,  February 2 at noon. You are NOT allowed to work in  groups for MP1.  Each person should complete and  submit their own MP1.  Instructions on downloading and installing SQLyog  on your personal computer can be found at: http://www.cs.uiuc.edu/class/cs105/sqlyog.htm
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 105 - Spring 2008 2 Objectives Make basic queries to a database using  SELECT   statements. Filter your queries using the WHERE   clause. Advanced filters using  And ,   Or   Not Sort the results of your queries using the  ORDER BY clause. Learn to add comments to explain your  code
Background image of page 2
CS 105 - Spring 2008 3 Connecting with SQLyog Start SQLyog.  (Start / Class Software /  CS105 / SQLyog) You should see login screen. If  a connection is not already defined,  click “New” and name the new  connection CS105. Enter the following data into the login  screen: Hostname:  cs105-mysql1.cs.uiuc.edu  or cs105-mysql2.cs.uiuc.edu   User:  cs105 Password:  cs105 Leave the ‘Database(s)’ box blank. Click “Connect!”
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS 105 - Spring 2008 4 Find the players table Once logged in, click on the plus sign to the left of  the  Baseball   database, then click on the  players   table.
Background image of page 4
CS 105 - Spring 2008 5 Querying the database with SELECT select   fieldName [, fieldName, …] from   tableName [ where   conditionStatement ] [ order by   fieldNames ] The  SELECT  statement  is  used  to  query  the  database.  Select  statements  in  this  course have the following format:
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS 105 - Spring 2008 6 Spelling and Clause Order CAUTION:  SQL queries are  computer  code .  If you do not spell queries correctly,  they will not work!
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/28/2008 for the course CS 105 taught by Professor Gambill during the Spring '08 term at University of Illinois at Urbana–Champaign.

Page1 / 21

SQL1 - CS105 Lab 2 - SQL Queries Announcements: Online Quiz...

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

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