Database Reference
In-Depth Information
insert into "TTLsample"(user_id,OTP,name)
values('imvivek','12121','vivek') using TTL
16;
Upon running the above query a row will be stored in
TTLsample table with TTL value set to 16 seconds for each column.
3.
Let's try to fetch the row before and after 16 seconds
select * from "TTLsample";
Figure 3-9 shows the output before and after 16 seconds.
Figure 3-9 . Output before and after the time to live expiration
4.
You also can set a TTL value for each column with an insert or
update operation.
insert into "TTLsample"(user_id,name)
values('imvivek','vivek');
insert into "TTLsample"(user_id,OTP)
values('imvivek','12121') using TTL 16;
Figure 3-10 shows output of the otp column before and after
TTL expiration.
 
 
 
Search WWH ::




Custom Search