MySql Basic Quries

CRUD Operations:

show version of mysql Database select version()
show current date and time selectcurrent_date,show now()
show user select user()
Crate DataBase: create database Test;
Make your DataBase as Default: use Test;
Crate Table: create table test(id bigint(10) default null auto_increment,name varchar(20) default null,primary key(id));
Insert a record: insert into test(name) values('Shashank');
Update a record: update tableA set name='somename' where id=1;
Delete a record delete from tableA where id=2;
select record with null select * from tableA where name is null;
show tables list show tables
show databases list show databases
show columns from particular table select columns from tb_templates

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s