Guys, I ask for help, and I ask you not to kick for a possibly stupid question, because I'm still new to programming. A few days puzzling over this task: There is an application in which the user can add or delete tasks, as well as store the time spent on each of them. Requirements: I have the ability to add / delete columns in a table if it is SQLite, without losing the data already in the table. In fact, how to implement it correctly?
- oneit is not clear why you need to delete the columns from the table? - pavel163
- I advise you to read the book by Bailey L. - "Learning SQL" - 2012 (published by O'Reilly). There, in a very accessible form, the DBMS device, the principles of working with them, the organization of data and so on are explained. including why it is necessary to delete records from a DB, but not columns. - pavlofff
|
1 answer
Use SQLite . with columns: id, task, time.
+----+-------+-------+ | id | task | time | +----+-------+-------+ | 1 | task1 | time1 | | 2 | task2 | time1 | | 3 | task3 | time1 | +----+-------+-------+ You will only need to delete the records from the database. Delete any columns do not have to
- Exactly, this is what I am slowing down, this is so elementary, thanks a lot - Dmitry Samoylov
|