Professional Programming Language
MY SQL
About:
Most popular open source relational SQL Database management system.
Used for developing various web-based software applications.
MYSQL Installation:
Create Database:
Use NewDB; //database name
create table example(//table name) (username varchar(50), password varchar(50));
OUTPUT:
Show the table data's:
use newdb;
desc example; //description
OUTPUT:
Insert data into tables:
use newdb;
INSERT into example values('xxxxx' , 'xxx123');
INSERT into example values('yyyy' , 'yyy123');
OUTPUT:
Selections in database:
1)Particular column select:
use newdb;
select username from example;
OUTPUT:
2)Particular field selection:
use newdb;
select * from example where username = 'xxxx';
OUTPUT:
3) Select particular fields:
use newdb;
select * from employee where empsalary >= 15000;
select * from employee where empsalary >= 20000;
OUTPUT:
Delete table in database:
use newdb;
delete from employee where empname = "xxyy";
OUTPUT:
Update data into tables:
use newdb;
update employee set empname = 'zzzz' where empid = 4;
OUTPUT:
Insert Particular Field:
use newdb;
insert into employee (empname, empid, empdesignation, empsalary) values ('xyxy', 5, 'executive', 10000));
OUTPUT:
Ascending order:
use newdb;
select * from employee order by empname asc;
No comments:
Post a Comment