Frequently used MYSQL Commands




Show all Database and Tables

mysql> show databases;
mysql> show tables;

 

Select Database

[root@host]# mysql -u root -p
Enter password:******
mysql> use TUTORIALS;
Database changed
mysql> 

 

Update entries

UPDATE products SET stocks=100;

 

Delete entries for table

DELETE FROM <table>
DELETE FROM <table> WHERE product_id=1;

 




Reference




Private

This area is only for registered user. Please register.