MySql is an open source database management system.
The following commands are used commonly:
mysql>create database dbname;
mysql>use dbname;
mysql>create table tablename
{
column name datatype,
column name datatype
};
popular datatypes: varchar, char, int, number, date, raw
insert into tablename values(1,'abc');
insert into tablename (column1, column2,..) values(1,'xyz',..);
select * from tablename where condition;
example:
select column from tablename where columnname IS NULL;
where salary between 1200 and 1800;
between (1200, 1800);
where salary IN (15000, 20000) //only these values in the set shal be met
where ename like (A*) //Name starting from A
update tablename set name='c' where id=2;
delete from tablename where id=2;
The following commands are used commonly:
mysql>create database dbname;
mysql>use dbname;
mysql>create table tablename
{
column name datatype,
column name datatype
};
popular datatypes: varchar, char, int, number, date, raw
insert into tablename values(1,'abc');
insert into tablename (column1, column2,..) values(1,'xyz',..);
select * from tablename where condition;
example:
select column from tablename where columnname IS NULL;
where salary between 1200 and 1800;
between (1200, 1800);
where salary IN (15000, 20000) //only these values in the set shal be met
where ename like (A*) //Name starting from A
update tablename set name='c' where id=2;
delete from tablename where id=2;
No comments:
Post a Comment