21.What’s wrong in the following query?SELECT subject_code, count(nam e) 22.What’s wrong in the following query?SELECT subject_code, AVG (m arks) 23.What do you understand by a subquery? When is it used?A subquery is a SELECT statement embedded in a clause of another SELECT statement. It is used when the inner query, o4r the subquery returns a value that is used by the outer query. It is very useful in selecting some rows in a table with a condition that depends on some data which is contained in the same table. 24.What’s wrong in the following query?SELECT student_code, nam e 25.What are the various multiple row comparison operators in SQL?IN, ANY, ALL. 26.What is the pupose of DML statements in SQL?The DML statements are used to add new rows to a table, update or modify data in existing rows, or remove existing rows from a table. 27.Which statement is used to add a new row in a database table?The INSERT INTO statement. 28.How do you insert null values in a column while inserting data?Null values can be inserted into a table by one of the following ways − 29.How do you copy rows from one table to another?The INSERT statement can be used to add rows to a table by copying from another table. In this case, a subquery is used in the place of the VALUES clause. 30.What happens if you omit the WHERE clause in the UPDATE statement?All the rows in the table are modified. 31.Can you modify the rows in a table based on values from another table? Explain.Yes. Use of subqueries in UPDATE statements allow you to update rows in a table based on values from another table. Say True or False. Give explanation if False. The DELETE statement is used to delete a table from the database. False. The DELETE statement is used for removing existing rows from a table. 32.What happens if you omit the WHERE clause in a delete statement?All the rows in the table are deleted. 33.Can you remove rows from a table based on values from another table? Explain.Yes, subqueries can be used to remove rows from a table based on values from another table. 34.What is the purpose of the MERGE statement in SQL?The MERGE statement allows conditional update or insertion of data into a database table. It
performs an UPDATE if the rows exists, or an INSERT if the row does not exist. 35.What is the difference between VARCHAR2 AND CHAR datatypes?VARCHAR2 represents variable length character data, whereas CHAR represents fixed length
character data. 36.What is a view? Why should you use a view?A view is a logical snapshot based on a table or another view. It is used for − 37.?
38.?
39.?
40.?
|