Download presentation
Presentation is loading. Please wait.
Published byAbigayle Ward Modified over 9 years ago
1
SQL HW1 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
2
Using MySQL The MySQL server is on candler.cs.unca.edu ssh to candler before connecting to the MySQL server Logon to the server using the student account as follows: candler> mysql –u student This account does not have a password Use the orderEntry database for this HW: mysql> use orderEntry; To run a query that has been stored in a file with the name query1.sql (in the current working directory): mysql> source query1.sql;
3
OPTIONAL: Connecting to the MySQL Server from OpenOffice Base on Windows Download the ‘Driver Installer (zipped EXE)’ for Windows from: http://dev.mysql.com/downloads/connector/odbc/3.51. html Follow the ‘Configuring a MyODBC DSN on Windows’ instructions on: http://dev.mysql.com/doc/refman/5.0/en/myodbc- configuration-dsn-windows.html In Base select connect to an ‘existing database’ and follow instructions.
4
Some basic SQL statements: Show the databases that are available for you to query: mysql> show databases; Select a database with the use command: mysql> use ; Show the tables in a database: mysql> show tables; After executing the use command View the attributes of a table: mysql> describe ; After executing the use command
5
Formulate the following queries in SQL and turn in a hardcopy of each query: Develop queries to answer the following questions from page 125 of your textbook: 2, 5, 6, 13
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.