Question
Which SQL command is used to remove only specific rows
from a table while preserving the structure and other rows?Solution
The DELETE command in SQL is used to remove specific rows from a table based on a WHERE clause condition. Unlike DROP or TRUNCATE, which impact the entire table, DELETE operates on a more granular level, enabling selective removal of data while preserving the table structure and any other rows. For example: DELETE FROM employees WHERE department = 'Sales'; This query removes only the rows from the employees table where the department is 'Sales', leaving all other rows intact. Additionally, the DELETE command logs each deleted row, making it possible to rollback transactions if the database supports it (e.g., in databases using transaction control). This makes DELETE particularly useful for scenarios where precision and rollback capabilities are required. Explanation of Incorrect Options: A) DROP : The DROP command is used to completely remove a table or database, including its structure. It is not selective and deletes the entire object. B) TRUNCATE : While TRUNCATE removes all rows from a table, it does not allow selective deletion. Furthermore, TRUNCATE is faster but does not log individual row deletions, making rollback impossible in most cases. D) REMOVE : This is not a valid SQL command. E) UPDATE : The UPDATE command is used to modify existing data, not to delete it.
Select the option that is related to the third term in the same way as the second term is related to the first term.
Srilanka : Island :: India : ?
Sushil lives to the North of Rajesh who lives to the West of Kamlesh. Arun who lives to the South of Sushil will have his house in which direction with ...
If A denotes β+β, B denotes βΓβ, C denotes βββ, and D denotes βΓ·β, then what will come in place of β?β in the following equation...
Select the option that is related to the third number in the same way as the second number is related to the first number.
6 : 85 : : 12 : ?
Select the correct mirror image of the given figure when the mirror is placed at MN as shown below.
A question is given followed by two arguments. Decide which of the arguments is/are strong with respect to the question.
Question:
Shoul...
In a certain code language, 'FUTILE' is written as 'UFITEL'. How will 'OCTAVE' be written in that language?
Select the figure that will come next in the following figure series.
In the series given below, how many 9s are there each of which is exactly divisible by its immediate succeeding number?
6 9 6 3 9 3 9 9 6 3 6 9 6...
Select the correct mirror image of the given figure when the mirror is placed at MN as shown below.
Β