How to create a retention policy for measurement?

I want to create a retention policy for measurement. By learning the doc I know that can creat a policy
for database【CREATE RETENTION POLICY <retention_policy_name> ON <database_name> DURATION REPLICATION [SHARD DURATION ] [DEFAULT]】.Will this retention policy delete all measurements data? What should I do to delete only the data of one measurement。Will this strategy delete continuous queries?Could you please help me .thanks a lot .

I have solved this. create a no default retention policy . Setting the retention policy when creating data.

create database telegraf
use telegraf
Using database telegraf
create retention policy “rp-one-year” on “telegraf” duration 365d replication 1
show retention policies on telegraf
name duration shardGroupDuration replicaN default


autogen 0s 168h0m0s 1 true
rp-one-year 8760h0m0s 168h0m0s 1 false

insert into “rp-one-year” devops-idc-sz,host=server01 cpu=23.1,mem=0.63
select * from “devops-idc-sz”

select * from “rp-one-year”.“devops-idc-sz”
name: devops-idc-sz
time cpu host mem


1571296987607266011 23.1 server01 0.63

select * from “telegraf”.“rp-one-year”.“devops-idc-sz”
name: devops-idc-sz
time cpu host mem


1571296987607266011 23.1 server01 0.63