Today i want to test MySQL database
I use mysql-4.1.22-win32, setup and after install it, i go to
and it will display this window (need password) if you use it setting :
default window will appear like this:
after that we learn about command syntax on mysql
to know mysql version we can use this syntax:
mysql> select version();
to display database that exist:
mysql> show databases;
to create new database:
mysql> create database practise01;
to change to database that you want to choose:
mysql> use practise01;
to create new table:
mysql> create table tblTest01(id int);
to show table structures:
mysql> describe tbltest01;
or
mysql> show columns from tbltest01;
to show tables that exist:
mysql> show tables;
to alter table structure:
mysql> alter table tbltest01 add nama varchar(20);
to fill your data table:
mysql> insert into tbltest01(id,nama) values(1,"jimon");
point : insert into tablenm(col1,col2,…) values(datacol1,datacol2,…)
to display data from current table:
mysql> select * from tbltest01;
to update data from current table:
mysql> update tbltest01 set id=3,nama="cyntia" where nama="cintia";
to close window mysql command prompt:
mysql> exit;
ok have a nice try, hope this will help you to know mysql better.
1 comment:
Thank you for Select a MySQL database to use tutorial.
Post a Comment