Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Management of SQL database and table

2025-03-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Management of SQL databases and tables (2)

Log in to the database by using SSMS database management tool

Create a database called db_class

Set the database to auto-shrink

Separate the database to facilitate the migration of database files

Detach database

Set a limit for credits between 0 and 20

The data types of the other columns are as follows

Additional database

Reattach the log files that were previously moved

Create a table called course

Insert data

Insert data using command statements

Change the teacher to Mr. Wang, note as sick, the course number is 0002

Create a table

Query the information of employees with a salary greater than 3000 in the table

Look up the people in the table who were born between 1950 and 1958

Inquire about the person whose home address is Changping

Increase the salary of all the salespeople in the table by 1000

Delete people whose wages are less than 3000

Cut the salaries of all managers by 10%

Inquire about the person named Wang Ming in the table

Inquire about people with scores greater than 95 in the table

Insert a new piece of data

Inquire about people whose classes are in Class 1 and whose scores are greater than 95 in the table.

Check everyone's grade point average.

Query all the people surnamed Zhang in the table

Delete data tabl

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report