SQLite – CREATE Table SQLite CREATE TABLE statement is used to create a new table in any of the given database. Creating a basic table involves naming the table and defining its columns and each column”s data type. Syntax Following is the basic syntax of CREATE TABLE statement. CREATE TABLE database_name.table_name( column1 datatype PRIMARY KEY(one […]
Category Archives: sqlite
SQLite – Date & Time SQLite supports five date and time functions as follows − Sr.No. Function Example 1 date(timestring, modifiers…) This returns the date in this format: YYYY-MM-DD 2 time(timestring, modifiers…) This returns the time as HH:MM:SS 3 datetime(timestring, modifiers…) This returns YYYY-MM-DD HH:MM:SS 4 julianday(timestring, modifiers…) This returns the number of days since […]
SQLite – VACUUM VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure. VACUUM command may change the ROWID of entries in tables […]