How to Run a SQL Query
- Step 1. Find a computer in
the Sieg building which has SQL Server installed (most of the undergrad
labs should have SQL Server).
- Step 2. In Windows, goto
Start, Programs, Microsoft SQL Server 2000, Query Analyzer.
- Step 3. A Box labelled Connect
to SQL Server should show up.
- In the input box
labelled SQL Server, type ISQL01
- Select the Use SQL
Server authentication option.
- As Login Name type cse444
- As Password type cse444
(please follow the exact capitalization)
- Press OK
By doing the last step, you connected to the SQL Server
machine called ISQL01, using the cse444 account. You will use this account to
complete your homework. For the project, you will get a different account.
- On the new opened windows,
there is an option called DB with a pull-down menu. You should have yana selected in that menu (this should be
selected by default after you login).
This is my database and I have given you read permissions on my
tables so you can complete the assignment.
- Try to write a query now.
* from Student
Type Ctrl-E to run the query (or click on
the little green arrow on the menu). If everything worked alright, you should
get back the results of the query - some tuples.
Congratulations - you just run your first query.
- “Student” is the name of a
table inside my database. As you see, it contains a number tuples with
information about different students.