Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to run sqlite in complier ?

+10 votes
asked Nov 24, 2021 by kunjal kanani (640 points)

1 Answer

+1 vote
answered Jan 2, 2022 by xDELLx (10,500 points)

/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
/* Enter your sql queries here */
CREATE TABLE demo2 ( id INTEGER PRIMARY KEY, name VARCHAR(20));
insert into demo2 values (1,'abc');
select * from demo2;
SELECT datetime('now');
insert into demo2 values (2,'abc');
insert into demo2 values (3,'abc');
insert into demo2 values (4,'abc');
insert into demo2 values (5,'abc');
insert into demo2 values (6,'abc');
insert into demo2 values (7,'abc');
select * from demo2;

select 1 from demo2;

Results from above:
/******************************************************************************^MWelcome to GDB Online.^MGDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,^MC#, VB, Swift, PascSQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
Connected to a [1mtransient in-memory database[0m.
Use ".open FILENAME" to reopen on a persistent database.
al, Fortran, Haskell, Objective-C, Assembly, HTML, readline: warning: turning off output flushingCSS
, JS, SQLite, Prolog.^MCode, Compreadline: warning: turning off output flushing
sqlite> /******************************************************************************
orl   ...> Welcome to GDB Online.
***   ...> GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
**   ...> C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
here    ...> Code, Compile, Run and Debug online from anywhere in world.
   ...>
me   ...> *******************************************************************************/
 (1sqlite> /* Enter your sql queries here */
om sqlite> CREATE TABLE demo2 ( id INTEGER PRIMARY KEY, name VARCHAR(20));
');^Minsert into demo2 values (3,'abc');^Minsert into demo2 values (4,'abc');^Minsert into demo2 values (5,'abc');^Minsert into demo2 values (6,'abc'sqlite> insert into demo2 values (1,'abc');
7,'abc');sqlite> select * from demo2;
emo2;^M^Ms1|abc
elesqlite> SELECT datetime('now');
2022-01-02 12:43:01
sqlite> insert into demo2 values (2,'abc');
sqlite> insert into demo2 values (3,'abc');
sqlite> insert into demo2 values (4,'abc');
sqlite> insert into demo2 values (5,'abc');
sqlite> insert into demo2 values (6,'abc');
sqlite> insert into demo2 values (7,'abc');
sqlite> select * from demo2;
1|abc
2|abc
3|abc
4|abc
5|abc
6|abc
7|abc
sqlite>
sqlite> select 1 from demo2;
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...