Start mysql with:
mysql -u user -pPASSWORD
To choose a database:
where mysql is the db name
To display all tables in the chosen database
To display all columns in a table:
SHOW COLUMNS FROM `user`;
where user is the table name
Or a single step command:
SHOW COLUMNS FROM `user` FROM `databasename`;[/code] To display data in a coloumn or field:SELECT `gamma` FROM `user`;
Where user is the table name and gamma is the field or coloumn name
To display two coloumns or fields side by side, you do:mysql> SELECT `user`,`password` FROM `user`;
where user and password are two columns in the table user.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.