Homework Help Question & Answers

Omitting WHERE USE the bank database and complete the following tasks using the [ mysql prompt: 1. Delete all the recor...

Omitting WHERE USE the bank database and complete the following tasks using the [ mysql prompt: 1. Delete all the records fro

Omitting WHERE USE the bank database and complete the following tasks using the [ mysql prompt: 1. Delete all the records from the users table.
0 0
Next > < Previous
ReportAnswer #1

There are two methods to delete all the records from the table

1. TRUNCATE: TRUNCATE is faster than DELETE. If there is no foreign key in the table and used to delete quickly then use TRUNCATE. Structure of TRUNCATE is given below.

TRUNCATE TABLE table_name;

for above statement query will be:

TRUNCATE TABLE users;

2. DELETE: DELETE is slower than TRUNCATE and used to delete all the rows or one by one row from the given table.

Structure of DELETE is given below.

DELETE FROM table_name WHERE [condition];

for delete all the rows use above query without WHERE clause.

FOR above statement query will be

DELETE FROM users;

Add Homework Help Answer
Add Answer of:
Omitting WHERE USE the bank database and complete the following tasks using the [ mysql prompt: 1. Delete all the recor...
Your Answer: Your Name: What's your source?
Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
More Homework Help Questions Additional questions in this topic.
Need Online Homework Help?
Ask a Question
Get FREE Expert Answers
WITHIN MINUTES
Related Questions