Tuesday, September 1, 2020

SQL PRACTICE

SQLite Manager
File
  • Open a Database
  • Create a new Database
  • Download active Database
  • Close window
  • Open FAQs page
  • Open SQLite help
  • Open Math.js help
  • Toggle Fullscreen
Manage
  • Clear Window
  • Create a new databasedb_new
  • Download selected databasedb_download
  • Close an existing databasedb_remove
  • Inspect selected databaseSELECT
  • Inspect table structurePRAGMA
  • Database infoPRAGMA
  • Optimize the databaseVACUUM
  • Open JavaScript editor
History
  • SELECT * FROM CS12 WHERE SNO>1
  • SELECT *↵ FROM CS12↵ WHERE sno==1
  • DELETE * FROM CS12 WHERE SNO ==1
  • DELETE * FROM CS12 WHERE SNO IS 1
  • SELECT * FROM CS12
  • INSERT INTO CS12 VALUES(2,"ANUKRATI")
  • INSERT INTO CS12 VALUES(1,"ABHISEK")
  • INSERT INTO CS12(1,"ABHISEK")
  • SELECT * FROM cs12
  • PRAGMA table_info(CS12)
  • CREATE TABLE CS12(↵ sno int,↵ snme char(50)↵ ↵ )
  • CREATE [UNIQUE] INDEX index_name↵ ON table_name (c1,c2,...)↵SELECT * FROM table_name limit 100
  • CREATE TABLE [IF NOT EXISTS] table_name(↵ primary_key INTEGER PRIMARY KEY,↵ column_name type NOT NULL,↵ column_name type NULL,↵ ...↵)↵CREATE TABLE [IF NOT EXISTS] table_name(↵ primary_key INTEGER PRIMARY KEY,↵ column_name type NOT NULL,↵ column_name type NULL,↵ ...↵)↵ALTER TABLE table_name RENAME TO new_nameALTER TABLE table ADD COLUMN column_definition
  • show tables;
  • show tables
  • create table student(sno int,name char(50))
  • create database stud;
  • CREATE TABLE [IF NOT EXISTS] table_name(↵ primary_key INTEGER PRIMARY KEY,↵ column_name type NOT NULL,↵ column_name type NULL,↵ ...↵)
  • select date('now')-date(2020-01-01);
  • select date('now');
  • select date(now);
  • date('2020-01-01')
  • SELECT date('now')-date('2020-01-01')
  • SELECT date('now')-'2020-01-01'
  • SELECT date('now')-'2020-01-20'
  • SELECT date('now');
  • SELECT julianday('now');
  • SELECT julianday('now') - julianday('1776-07-04');
  • Clear history
SQLite
  • Export
  • Export to math.js as a matrixSELECT
  • Managing Tables
  • Create a new tableCREATE
  • Rename a tableALTER
  • Add a new column to a tableALTER
  • Drop an existing column in a tableALTER
  • Drop a table and its dataDROP
  • Managing Indexes
  • Creating an indexCREATE
  • Create an expression indexCREATE
  • Querying Data
  • Query all data from a tableSELECT
  • Query data from the specified columnSELECT
  • Query unique rowsSELECT
  • Query rows using a WHERE clauseSELECT
  • Rename column in the query’s outputSELECT
  • Query data from multiple tablesSELECT
  • Count rows returned by a querySELECT
  • Sort rows using ORDER BY clauseSELECT
  • Group rows using GROUP BY clauseSELECT
  • Filter group of rows using HAVING clauseSELECT
  • Changing Data
  • Insert a row into a tableINSERT
  • Insert multiple rows into a tableINSERT
  • Update all rows in a tableUPDATE
  • Update rows that match with a conditionUPDATE
  • Delete all rows in a tableDELETE
  • Delete rows specified by a conditionDELETE
  • Search
  • Search using LIKE operatorSELECT
  • Search using full-text searchSELECT
Math.js
  • Arrays and matricesmatrix
  • Use functionsmap
  • Use SQL functionsql
  • Use SQL function (parametric)sql
  • Use SQL function (parametric array)sql
  • Zeros functionzeros
  • Ones functionones
  • Range functionrange
  • Size and Dimensionssize
Chart.js
  • Line chartplot
  • Time chartplot
  • Scatter chartplot
  • Bar chartplot
  • Pie chartplot
  • Doughnut chartplot
empty output
cidnametypenotnulldflt_valuepk
10snoint00
21snmechar(50)00
empty output
empty output
snosnme
11ABHISEK
empty output
snosnme
11ABHISEK
22ANUKRATI
snosnme
11ABHISEK
snosnme
12ANUKRATI
Loading...

No comments:

Post a Comment