Question: Write a sqlite3 program that creates a database test.db with a table horse_table with columns horse (text, the name of a horse) and age

Write a sqlite3 program that creates a database test.db with a table



Write a sqlite3 program that creates a database test.db with a table horse_table with columns horse (text, the name of a horse) and age (int, the age of the horse). On the file data, txt, whose contents are the following (famous horses and my fictional ages for them). 12 Cincinnati Seabiscuit 6 Bucephalus 14 Secretariat 7 Trigger 10 Marengo 13 Joey 8 Read in the lines and create a row in horse_table for each line. Use a prepared statement. Write another sqlite3 program, this time to find all the horses in hor se_table whose ages are greater than 7 and less then 13. Print out their names, giving Cincinnati Trigger Joey Again use a prepared statement.

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is the sqlite3 program to create the database testdb table horsetable and insert ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

663d55e7b2636_967902.pdf

180 KBs PDF File

Word file Icon

663d55e7b2636_967902.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!