MySQL Programming Question:
Download Job Interview Questions and Answers PDF
How Many SQL DML Commands Are Supported by "mysql"?
Answer:
There are 4 SQL Data Manipulation Language (DML) commands that are supported by "mysql". They are listed below with short descriptions:
* "INSERT INTO tableName ..." - Inserts new data rows into the specified table.
* "DELETE FROM tableName ..." - Deletes existing data rows from the specified table.
* "UPDATE tableName SET ..." - Updates existing data rows in the specified table.
* "SELECT expressionList FROM ..." - Selects rows from tables and returns rows of values resulted from the specified expression list.
Here is a tutorial exercise of how to use DML commands to insert and select data rows:
>cd mysqlin
>mysql -u root test
mysql> CREATE TABLE links (id INTEGER, name VARCHAR(80));
Query OK, 0 rows affected (0.10 sec)
mysql> INSERT INTO links VALUES (1, 'www.GlobalGuideLine.com');
Query OK, 1 row affected (0.02 sec)
mysql> SELECT * FROM links;
<pre>+------+-------------------------+
| id | name |
+------+-------------------------+
| 1 | www.GlobalGuideLine.com |
+------+-------------------------+</pre>
1 row in set (0.04 sec)
* "INSERT INTO tableName ..." - Inserts new data rows into the specified table.
* "DELETE FROM tableName ..." - Deletes existing data rows from the specified table.
* "UPDATE tableName SET ..." - Updates existing data rows in the specified table.
* "SELECT expressionList FROM ..." - Selects rows from tables and returns rows of values resulted from the specified expression list.
Here is a tutorial exercise of how to use DML commands to insert and select data rows:
>cd mysqlin
>mysql -u root test
mysql> CREATE TABLE links (id INTEGER, name VARCHAR(80));
Query OK, 0 rows affected (0.10 sec)
mysql> INSERT INTO links VALUES (1, 'www.GlobalGuideLine.com');
Query OK, 1 row affected (0.02 sec)
mysql> SELECT * FROM links;
<pre>+------+-------------------------+
| id | name |
+------+-------------------------+
| 1 | www.GlobalGuideLine.com |
+------+-------------------------+</pre>
1 row in set (0.04 sec)
Download MySQL Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
How Many SQL DDL Commands Are Supported by "mysql"? | What Are the Non-Standard SQL Commands Supported by "mysql"? |