And you don't have to be a SQL expert to use SQLModel.īut if you are curious and want to get a quick overview of SQL, I recommend the visual documentation from SQLite, on SQL As Understood By SQLite. I will keep showing you small bits of SQL through this tutorial. You will see the "execution finished successfully" message.Īnd if you go back to the Database Structure tab, you will see that you effectively created again the same table. Write the same SQL that was generated in the previous step:ĬREATE TABLE "hero" ( "id" INTEGER, "name" TEXT NOT NULL, "secret_name" TEXT NOT NULL, "age" INTEGER, PRIMARY KEY ( "id" ) ) This time, if you see the dialog to create a new table, just close it by clicking the Cancel button. database.db file in your project directory. Now, to see how is it that SQL works, let's create the table again, but with SQL.Īnd delete that. You will see again the same table we created. Now click on Open Database to open the database again, and select the same file. Confirm the Table ¶įirst click the button Close Database to close the database. The only step left is to click Write Changes to save the changes to the file.Īfter that, the new table is saved in this database on the file. Now you will see that it shows up in the list of Tables with the columns we specified. There could be more SQL statements in the same SQL string. It also has the semicolon " " that marks the end of the SQL statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |