Stuck on - Count rows in a table #nd9

I cannot seem to find the rootpage when reading page-1’s schema table.

I also tried using the existing sqlite3 cli on my machine but it prints the following when I run SELECT * FROM sqlite_master;

table|apples|apples|2|CREATE TABLE apples
(
        id integer primary key autoincrement,
        name text,
        color text
)
table|sqlite_sequence|sqlite_sequence|3|CREATE TABLE sqlite_sequence(name,seq)
table|oranges|oranges|4|CREATE TABLE oranges
(
        id integer primary key autoincrement,
        name text,
        description text
)

I was expecting to see the root pages being shown for each table but I cannot find them.

I think I get it now, the part that comes before the CREATE is the section documented The Schema Table and the root page is the number before the CREATE part. I guess I was confusing the sql section (which is the part that starts with the “CREATE”) since it seemed to match the format in the documentation.

1 Like

Hey @Lemour-sudo, exactly, you’ve got it!

Let me know if you run into other issues.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.