Вы находитесь на странице: 1из 15

Tutorial SQL Server

Database Management System

Virtual University of Pakistan


Installation Process
1. Double click the “AUTORUN” icon in the SQL Server 2000 CD.
2. Click “SQL Server 2000 Components”

3. Click “Install Database Server”

2
4. Click “Next”

5. Choose the option and Click “Next”

3
6. Click the above option and click “Next”

7. Enter the “Details” and click “Next”

4
8. Click “Yes”

9. Choose “Server and Client Tools” and click “Next”

5
10. Write down the “Instance Name” and click “Next”

11. Choose your option and click “Next”

6
12. Choose “Service Settings” option and click “Next”

13. Choose the option and Click “Next”

7
14. Click “Next”

15. Click “Finish”

8
How to Use Query Analyzer
To create a database by using Query Analyzer; write down the command in query
window and Press F5 or click Execute Query (F5) button on tool bar.

To use the particular database select that corresponding database from combo box

9
To create a table by using Query Analyzer, write down the command in query
window and Press F5 or click Execute Query (F5) button on tool bar.

You will see the message “The command(s) completed successfully” after query
execution.

To see the created table in Query Analyzer


Refresh your database in object Browser. If Object Browser is not there, Press F8

By expanding the tree you can see the details of your table.

10
Inserting Comments
To comment a command in Command widow, we use “/*” in the beginning and “*/”
in the end of the command. To comment the single line, we use “- - “

11
How to Use Enterprise Manager
To see the table in the Enterprise Manager expand tree

Click on the tables than you will see tables in the right pane. There will be some
tables which are system tables and some that you have made. You can differentiate
between them by column Type. There will be two entries in this column: (1) user (2)
system

12
You can see table details by double clicking on the table

To see the table data Right click on the particular table, select “Open table” and then
click” Return all Rows”

13
You can also insert the data into the tables

To create a new table using enterprise Manager:


1) To “create” a table using “Enterprise Manager”, Right Click on the tables and
Select “New table”

2) Enter the details of the table

14
3) To set a “default value”, select the column and set its default value in default
values row.

4) To set a primary key, Right Click on the Column and Select “Set primary Key”

5) And save the table and write its name

15

Вам также может понравиться