| . |
|
. |
| |
| MySQL |
| Quick guru |
| Login | mysql -p db_name |
| Run sql script | mysql -p db_name <script_file |
| notes | -p = prompt for password |
| List tables | show tables; |
| List records in table | select * from table_name; |
| Count records in table | select count(*) from table_name; |
| Insert record | insert into table_name (field1, field2) values ('value1_value', 'value2_value'); |
| Update record | update table_name set field1 = 'value1_value', field2 = 'value2_value'; |
| Delete record | delete from table_name where field1 = 'value1_value'; |
| Delete all records | truncate table_name; |
|
| Documentation |
|
|
|
|
|
|
|