A bash-2.05b # ls
CERT devm radius rule sqlite3 uibase VPN
<Span style = "color: # ff6600"> bash-2.05b #./sqlite3 rule </span>
// Start to enter the database
SQLite version 3.5.4
Enter ". Help" for instructions
<Span style = "color: # ff6600"> SQLite>. Tab </span>
// Display tables in the database
Domainname ruleipfilterstatout rulesnatip
Ipobj ruleipfiltertime rulesnatpro
<Span style = "color: # ff6600"> SQLite> select * From ipobj; // query the table
</Span>
1 | test1 | 0 | 1 | 1.0.0.0 |
2 | Test2 | 8 | 1 | 1.0.0.0 |
<Span style = "color: # ff6600"> SQLite>. h on </span>
// Command for displaying table fields
<Span style = "color: # ff6600"> SQLite> select * From ipobj; </span>
<Span style = "color: # ff0000"> ID | Name | vsysid | refcount | startip | endip | mask </span>
// Table Field
1 | test1 | 0 | 1 | 1.0.0.0 |
2 | Test2 | 8 | 1 | 1.0.0.0 |
<Span style = "color: # ff6600"> SQLite> insert into ipobj (name, vsysid, refcount, startip, endip, mask) values ('A', '3 ', '2', '1. 1.1.1 ', '',''); </span>
// Add operation
SQLite> select * From ipobj;
Id | Name | vsysid | refcount | startip | endip | mask
1 | test1 | 0 | 1 | 1.0.0.0 |
2 | Test2 | 8 | 1 | 1.0.0.0 |
3 | A | 3 | 2 | 1.1.1.1 |
<Span style = "color: # ff6600"> SQLite> Update ipobj set name = 'aaa' where id = 3; </span>
// Modify the operation
SQLite> select * From ipobj;
Id | Name | vsysid | refcount | startip | endip | mask
1 | test1 | 0 | 1 | 1.0.0.0 |
2 | Test2 | 8 | 1 | 1.0.0.0 |
3 | AAA | 3 | 2 | 1.1.1.1 |
<Span style = "color: # ff6600"> SQLite> Delete from ipobj where id = 3; </span>
// Delete operation
SQLite> select * From ipobj;
Id | Name | vsysid | refcount | startip | endip | mask
1 | test1 | 0 | 1 | 1.0.0.0 |
2 | Test2 | 8 | 1 | 1.0.0.0 |