| |

VerySource

 Forgot password?
 Register
Search
View: 840|Reply: 5

How to automatically delete records in a table in sql server

[Copy link]

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-10-16 10:00:02
| Show all posts |Read mode
I have a problem now, because the records in the database are automatically collected by the system. There are too many records in the table, which seriously affects the efficiency of the database. Can there be a way in the sql server to automatically trigger it after a certain period of time. Delete the content in
Reply

Use magic Report

0

Threads

49

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2020-10-16 10:30:01
| Show all posts
Delete with assignment
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-10-16 10:45:01
| Show all posts
Yes, build a job (JOB) and execute it regularly
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-10-16 12:15:01
| Show all posts
job
Reply

Use magic Report

0

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-10-16 15:30:01
| Show all posts
sp_add_job [@job_name =]'job_name'
[, [@enabled =] enabled]
[, [@description =]'description']
[, [@start_step_id =] step_id]
[, [@category_name =]'category']
[, [@category_id =] category_id]
[, [@owner_login_name =]'login']
[, [@notify_level_eventlog =] eventlog_level]
[, [@notify_level_email =] email_level]
[, [@notify_level_netsend =] netsend_level]
[, [@notify_level_page =] page_level]
[, [@notify_email_operator_name =]'email_name']
[, [@notify_netsend_operator_name =]'netsend_name']
[, [@notify_page_operator_name =]'page_name']
[, [@delete_level =] delete_level]
[, [@job_id =] job_id OUTPUT]

There is online help
Reply

Use magic Report

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2020-10-16 17:30:01
| Show all posts
Thanks, huh
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list