![]() User can alter table add columns variants and can rename the table. create table Įxample for Creating a table : create table studentĪLTER TABLE :This command is used to alter the database objects like tables. User can create table in any database, by defining table name and its columns with specifications(datatypes). Now let’s we explain all these commands one by one in detail:ĬREATE TABLE :This command is used to create database objects like tables. SELECT : It allow us to retrieve the records. INSERT : This command is used to insert a record in the table.ĭQL stands for Data Query Language which basically is used to retrieve the records in the table. ![]() But user can not drop a column in SQLite.ĪLTER : This command allow us to alter or modify the existing structure like rename table, add column etc but cannot alter a column.ĭML stands for Data Manipulation Language which basically manipulates the data/record like insert, update or delete. etc.ĭROP : This is basically to drop the structure of the table, view etc. It include commands like create, alter and drop.ĬREATE : This command is used to create a table, index, trigger, view or other database objects. This is used to define the structure of the database. Use ".open FILENAME" to reopen on a persistent database.ĭDL stands for Data Definition Language. SQLite version 3.16.2 16:32:41Ĭonnected to a transient in-memory database. open command it will open the existing database or create a new if database does not exist. open : User can just define database name with. There are 3 main divisions in this, but before this let’s know about how to create a database in SQLite.Ĭreate Database: Database is a container which contain tables, views etc. But here there’s nothing like that as it as self-contained and serverless. Like in other relational database the request is send from client to the database server, further the request is processed. SQLite works as Relational Database Management System. The SQLite commands are similar to that of SQL. The preferred storage class for a column is called its “affinity”.Įach column has assigned following type affinities: Type affinity is the recommended type for data stored in that column. ![]() In order to maximize compatibility between SQLite and other database engines, SQLite supports the concept of “type affinity” on columns. We have used above classes in commands of this article. Text : The value is a text string, stored using the database encoding (UTF- 8, UTF-16BE or UTF-16LE)īlob : The value is a blob of data, stored exactly as it was input. Real : The value is a floating point value, stored as an 8-byte IEEE floating point number. Integer : The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.
0 Comments
Leave a Reply. |