SQL Multiple choices


Total available count: 51
Subject - Databases
Subsubject - SQL

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?


 

 

 

 



B


Solution:-

The SQL DELETE Statement
The DELETE statement is used to delete existing records in a table.

DELETE Syntax

DELETE FROM table_name WHERE condition;

SQL DELETE Example
The following SQL statement deletes the Admin "Slightbook Admin" from the "SlightBook" table:

Example

DELETE FROM SlightBook WHERE AdminName='Slightbook Admin';

 




Next 5 multiple choice(s)

1

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

2

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

3

With SQL, how can you insert a new record into the "Persons" table?

4

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

5

Which SQL keyword is used to sort the result-set?

Comments