delete from table code example

Example 1: drop table in mysql

DROP TABLE table_name;

Example 2: delete all records from table

DELETE FROM table_name;

Example 3: sql delete where in

-- Deletes all records where `columnName` matches the values in brackets.
DELETE FROM tableName WHERE columnName IN ('val1', 'val2', 'val3');

Example 4: sql delete all values in a column

UPDATE TableName SET ColumnName = NULL

Example 5: how to delete a table data in sql

DELETE FROM table_name; //will delete the table data without affecting the table structue

Example 6: sql delete table

Deletes a table from a database.
Example: Removes the users table.
DROP TABLE users;

Tags:

Lua Example