Page 283 - PYTHON-12
P. 283
(e) Null (unavailable and unknown) values are entered by the following command:
INSERT INTO TABLE_NAME VALUES (“NULL”);
(f) ALTER TABLE command is used to modify the structure of the table.
(g) Each SQL table must have at least one column and one row.
(h) Foreign key column derives its value from the primary key of the parent table.
(i) DISTINCT clause is used to remove redundant rows from the result of the SELECT statement.
(j) SELECT MIN (salary) FROM Employee will return the highest salary from the table.
Answers: (a) True (b) False (c) True (d) False (e) False (f) True
(g) False (h) True (i) True (j) False
3. Multiple Choice Questions (MCQs)
(a) The .................. allows us to perform tasks related to data definition.
(i) DDL (ii) DML
(iii) TCL (iv) None of the above
(b) The .................. allows us to perform tasks related to data manipulation.
(i) DDL (ii) DML
(iii) TCL (iv) None of the above
(c) A .................. is a text that is not executed.
(i) Statement (ii) Query (iii) Comment (iv) Clause
(d) .................. are words that have a special meaning in SQL.
(i) Keyword (ii) Literal (iii) Variable (iv) Table
(e) .................. command helps to open the database for use.
(i) Use (ii) Open (iii) Distinct (iv) Select
(f) .................... command helps to fetch data from relation.
(i) Use (ii) Show (iii) Fetch (iv) Select
(g) The .................... keyword eliminates duplicate rows from the results of a SELECT statement.
(i) Or (ii) Distinct (iii) Any (iv) All
(h) .................... command helps to see the structure of a table/relation.
(i) Show (ii) Select (iii) Describe (iv) Order by
(i) .................... is known as range operator in MYSQL.
(i) IN (ii) DISTINCT (iii) IS (iv) BETWEEN
(j) The .................... clause allows sorting of query results by one or more columns.
(i) All (ii) Distinct (iii) Group By (iv) Order By
Answers: (a) (i) (b) (ii) (c) (iii) (d) (i) (e) (i) (f) (iv)
(g) (ii) (h) (iii) (i) (iv) (j) (iv)
SOLVED QUESTIONS
1. What is SQL?
Ans. Structured Query Language (SQL) is a language used for accessing databases.
2. Define the following terms: Field, Record, Table.
Ans. Field: A field is the smallest unit of a table which is also known as a column. Columns are called attributes
in a table. For example, Employee Name, Employee ID, etc.
Record: A record is the collection of values/fields of a specific entity. For example, record of an employee
that consists of Employee name, Salary, etc.
Table: A table is called a relation. It is a collection of records of a specific type of data. For example,
employee table, salary table, etc., that can consist of the records of employees and records of salary Relational Database and SQL
respectively.
12.53