Category Archives: Database
Drop all tables from a Drupal MySQL database
Handy command to mass-drop all tables: $ drush sql-dump | grep DROP | drush sql-cli
Set a MySQL column to random numbers, 1-line query
Useful query to seed a database table with random numbers. I used this for testing a support desk application: UPDATE support_ticket SET priority = CAST((RAND() * 3)+1 AS UNSIGNED); Where “3″ is the highest number in your range. By default, … Continue reading
Filed under Database