Get the App
SLTechnology News&Howtos  ›  Database  › 

2 Management steps of database and table

Shulou Source: shulou.com Published: 2022-06-01 18:35:43 10月03日 Update

Management of 2.sqlserver database and table

Anti-counterfeiting code: Shushan has a road and works hard for the path of endless learning.

Experiment 1:

Experimental environment: the company has installed SQL SERVER 2008 Enterprise Edition, and now completes the following tasks:

1. Create a database named benet (omitted)

2. Create a table called the employee Information Table, which contains fields, as shown in figure 1, and complete the following query

1) display all the contents of the table

2) display all information for employees with a salary greater than 5000

3) display all information about all employees born between 1950 and 1988

4) find out all the employees living in Changping

3. To complete the following required operations, please write the relevant T-SQL statements.

1) the salary of all salespeople has increased by 1000

Verify:

2) delete the records of employees whose wages are less than 3000

3) the salary of all managers will be reduced by 10%

Experiment 2:

Attach the database student and open the student table, as shown in the following figure:

Experimental objectives:

1. Inquire about Wang Ming's achievements? Result: Wang Ming 90

2. Add 2 points to Wang Ming?

3. Query the students whose remarks are not empty?

4. inquire about the students whose scores are more than 95 points?

5. Wang Ming transferred to another school and deleted Wang Ming.

6. Here comes a new classmate whose name is Yu Mei?

7. who has a query score of more than 95 and whose class is Class 2?

8. Who has a query score of more than 95 and whose class is Class 1 or Class 2?

9. Inquire about the GPA?

10. Inquire about Zhang?

11. Delete the student table

Attachment: http://down.51cto.com/data/2368073

Tags: Query employee grade Wang Ming salary experiment data database information student class management beauty boundless learning task enterprise company content classmate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology MariaDB Apple Docker