• SQL

    Remove Items From SQL Databases Using the DROP Statement

    In SQL, the DROP Statement is used to remove databases, tables, and indexes. The syntax to remove a table is: DROP TABLE nameoftable Wow. That’s really, really easy. I mean, you can delete craploads of data that way! It can’t be! You can also delete a database. To do so, use the DROP statement again, but this time, instead of dropping a table, let’s remove the database: DROP DATABASE nameofdatabase Aaaaaand, you can drop an index, which on MySQL is done using an ALTER statement, followed by TABLE, then the table name that has an index needing to drop: ALTER TABLE nameoftable DROP INDEX nameofindex You can also delete the…