Computer Science, asked by amrit2645, 3 months ago


Explain the following DML Commands: a) INSERT b) SELECT​

Answers

Answered by skfathima345
1

The SQL data manipulation language (DML) is used to query and modify database data. In this chapter, we will describe how to use the SELECT, INSERT, UPDATE, and DELETE SQL DML command statements, defined below.

SELECT – to query data in the database

INSERT – to insert data into a table

UPDATE – to update data in a table

DELETE – to delete data from a table

In the SQL DML statement:

Each clause in a statement should begin on a new line.

The beginning of each clause should line up with the beginning of other clauses.

If a clause has several parts, they should appear on separate lines and be indented under the start of the clause to show the relationship.

Upper case letters are used to represent reserved words.

Lower case letters are used to represent user-defined words.

SELECT Statement

The SELECT statement, or command, allows the user to extract data from tables, based on specific criteria. It is processed according to the following sequence:

SELECT DISTINCT item(s)

FROM table(s)

WHERE predicate

GROUP BY field(s)

ORDER BY fields

We can use the SELECT statement to generate an employee phone list from the Employees table as follows:

SELECT FirstName, LastName, phone

FROM Employees

ORDER BY LastName

This action will display employee’s last name, firs

Answered by tanya6968
4
The INSERT statement is used to insert a new row in the database that is adding data to a table. The SELECT statement is used to retrieve record from one or more tables. The UPDATE statement is used to update the data or row in the table. The MERGE statement is used to merge two rows or two tables in the database.
Similar questions