sql_queries
sql_queries
->show databases;
--------------------------------------------------------------------------
clear system
system cls;
--------------------------------------------------------------------------
use database
use databasename;
-----------------------------------------------------------------------------
to know list of table
show tables;
-----------------------------------------------------------------------------
select database
select databasename();
-------------------------------------------------------------------------------
create table
and & or operator:--when we use "and" operator both cond should be true whereas in
"or" operator either one or both condition should be true.
syntax-- sql statement where cond1 and cond 2;
eg:
select * from student where city='bhopal' and class = 'bcom';
note: "and" operator return when both cond's are true.
---------------------------
syntax-- sql statement where cond1 or cond 2;
eg:
select * from student where city='bhopal' or class = 'bcom';
syntax:--
sql statement where columname between lower_limit and upper_limit.
eg:
select * from student where fees between 20000 and 40000;
-----------------------------------------------------------------------------------
--------
in and not in operator:--
eg:
-----------------------------------------------------------------------------------
-------------