# SQLite

SQLite is not a client–server database engine. Rather, it is embedded into the end program.

open sqlite database using sqlite3:&#x20;

`student@attackdefense:~$ sqlite3 data.db`&#x20;

**display tables:**&#x20;

```
sqlite> .tables 
FLAG  app
```

&#x20;**Select from table:**&#x20;

```
sqlite> SELECT * FROM FLAG; 
44dd29a07a0086948ad19ad6376db7d6 
```

**display table columns names:**&#x20;

```
sqlite> PRAGMA table_info(FLAG); 
0|ID|INT|1||1 
1|NAME|TEXT|1||0 
2|AGE|INT|1||0 
3|ADDRESS|CHAR(50)|0||0 
```

**exit sqlite3:**&#x20;

```
sqlite> .quit 
```

**Count columns:**&#x20;

```
sqlite> SELECT count(*) FROM employees; 
8 
```

**Filter columns:**&#x20;

```
sqlite> SELECT * FROM artists WHERE Name LIKE 'The%'; 
137|The Black Crowes 
138|The Clash 
139|The Cult 
140|The Doors 
141|The Police 
142|The Rolling Stones 
143|The Tea Party 
144|The Who 
156|The Office 
174|The Postal Service 
176|The Flaming Lips 
200|The Posies 
247|The King's Singers 
259|The 12 Cellists of The Berlin Philharmonic 
```

## **Resource**:&#x20;

Can practice in AttackDencesLabs&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/enumeration/services-ports/sqlite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
