79 solutions available
Question 1Assertion. The UNIQUE and PRIMARY KEY constraints are similar but not the same.Reason. There can be only one column with PRIMARY KEY...
Question 2Assertion. In terms of values allowed in a column, both UNIQUE and PRIMARY KEY constraints are not the same.Reason. UNIQUE allows NULL...
Question 3Assertion. The INSERT INTO statement can skip some columns' values.Reason. Only the columns allowing the NULL values or have...
Question 4Assertion. The PRIMARY KEY can be defined only once in the CREATE TABLE command.Reason. If the PRIMARY KEY is a composite key, then it is...
Question 5Assertion. INSERT, UPDATE, DELETE, SELECT are the DML commands.Reason. The DML commands manipulate the data stored in the database...
Question 6Assertion. The PRIMARY KEY and FOREIGN KEY constraints are similar.Reason. The FOREIGN KEY constraint links a column of a table with the...
Question 7Assertion. Data types varchar and char are the same as they both represent the string data.Reason. The VARCHAR datatype stores variable...
Question 1How are SQL commands classified ?
Question 2Differentiate between DDL and DML commands.
Question 3Kabir has created the following table named exam :RegNoNameSubjectMarks1SanyaComputer...
Question 4(a)What is the use of UPDATE statement in SQL ? How is it different from ALTER statement ?
Question 4(b)Mr. Shankar created a table VEHICLE with 3 rows and 4 columns. He added 1 more row to it and deleted one column. What is the Cardinality...
Question 4(c)Consider the following table named "GYM" with details about fitness items being sold in the store. Write command of SQL for (i) to...
Question 5(a)Mr. James created a table CLIENT with 2 rows and 4 columns. He added 2 more rows to it and deleted one column. What is the Cardinality...
Question 5(b)Consider the following table FITNESS with details about fitness products being sold in the store. Write command of SQL for (i) to...
Question 6Write SQL commands for the following on the basis of given table CLUB.Table :...
Question 7Write SQL commands for the following on the basis of given table STUDENT1.Table :...
Question 8What is foreign key ? How do you define a foreign key in your table ?
Question 9How is FOREIGN KEY commands different from PRIMARY KEY command ?
Question 10How is FOREIGN KEY commands related to the PRIMARY KEY ?
Question 11What are table constraints ? What are column constraints ? How are these two different ?
Question 12Insert all those records of table Accounts into table Pending where amt_outstanding is more than 10000.
Question 13Increase salary of employee records by 10% (table employee).
Question 14Add a constraint (NN-Grade) in table Empl (given before assignment) that declares column Grade not null.
Question 15Drop the table Empl.
Question 16(i)Differentiate between DROP TABLE, DROP DATABASE.
Question 16(ii)Differentiate between DROP TABLE, DROP clause of ALTER TABLE.
Question 17Mr. Mittal is using a table with following columns :Name, Class, Stream_Id, Stream_name He needs to display names of students who have not...
Question 18The Doc_name Column of a table Hospital is given below :Doc_nameAvinashHariharanVinayakDeepakSanjeevBased on the information, find the...
Question 19Sarthak, a student of class XII, created a table "Class". Grade is one of the columns of this table. To find the details of students whose...
Question 20What is the purpose of ALTER TABLE command ? Can you add new columns with constraints such as NOT NULL ? Give example to justify your...
Question 21What is the purpose of DROP TABLE command in MySql ? How is it different from DELETE command ?
Question 1What is SQL ? What are the different categories of SQL commands ?
Question 2What is a datatype ? Name some data types available in MySQL.
Question 3How would you calculate 13 * 15 in SQL ?
Question 4Is NULL value the same as 0 (zero) ? Write the reason for your answer.
Question 5Write the UPDATE command to increase the commission (Column name : COMM) by 500 of all the Salesmen who have achieved Sales (Column name :...
Question 6While using SQL pattern matching, what is the difference between '_' (underscore) and '%' wildcard symbols ?
Question 7Write one similarity and one difference between CHAR and VARCHAR data types.
Question 8Write SQL statement to displayToday, the date is <current date>
Question 9Write a command to add a NOT NULL constraint on FEES column of a student table.
Question 10What is a constraint ? Name some constraints that you can apply to enhance database integrity.
Question 11What is primary key ? What is PRIMARY KEY constraint ?
Question 12What is NOT NULL constraint ? What is DEFAULT constraint ?
Question 13When a column's value is skipped in an INSERT command, which value is inserted in the database ?
Question 14Write MySql command to display the list of existing databases.
Question 15Write MySql command will be used to open an already existing database "CONTACTS".
Question 1The USE command can be used to select an existing database in SQL.
Question 2The SQL keyword FROM is used to specify the table(s) that contains the data to be retrieved.
Question 3To remove duplicate rows from the result of a query, specify the SQL qualifier DISTINCT in select list.
Question 4To obtain all columns, use a(n) asterisk(*) instead of listing all the column names in the select list.
Question 5The SQL WHERE clause contains the condition that specifies which rows are to be selected.
Question 6When two conditions must both be true for the rows to be selected, the conditions are separated by the SQL keyword AND.
Question 7To refer to a set of values needed for a condition, we can use the SQL operator IN.
Question 8To exclude one or more values (a list of values) using a condition, the SQL keyword NOT IN should be used.
Question 9The SQL keyword LIKE is used in SQL expressions to select based on patterns.
Question 10The UPDATE command can be used to make changes in the rows of a table in SQL.
Question 1What is the full form of SQL ?Structured Query LanguageStructured Query ListSimple Query LanguageNone of these
Question 2What is the full form of DDL ?Dynamic Data LanguageDetailed Data LanguageData Definition LanguageData Derivation Language
Question 3What does DML stand for ?Different Mode LevelData Model LanguageData Mode LaneData Manipulation language
Question 4Which is the subset of SQL commands used to manipulate database structures, including tables ?Data Definition Language (DDL)Data...
Question 5Which of the following sublanguages of SQL is used to define the structure of the relation, deleting relations and relating schemas ?DML...
Question 6Which of the following sublanguages of SQL is used to query information from the database and to insert tuples into, delete tuples from,...
Question 7With reference to SQL, identify the invalid data type.DateIntegerYearMonth
Question 8Which of the following is a DDL command ?SELECTALTERINSERTUPDATE
Question 9Which of the following keywords will you use in the following query to display the unique values of the column dept_name?SELECT...
Question 10Which of the following keywords will you use in the following query to display all the values of the column dept_name ?SELECT...
Question 11The ............... clause of SELECT query allows us to select only those rows in the result that satisfy a specified...
Question 12Consider the following query :SELECT name FROM class WHERE subject ............... NULL; Which comparison operator may be used to fill the...
Question 13In SQL, which command is used to SELECT only one copy of each set of duplicable rows ?SELECT DISTINCTSELECT UNIQUESELECT DIFFERENTAll of...
Question 14Which of the following types of table constraints will prevent the entry of duplicate rows ?UniqueDistinctPrimary KeyNULL
Question 15Ravisha has stored the records of all students of her class in a MYSQL table. Suggest a suitable SQL clause that she should use to display...
Question 1The condition in a WHERE clause in a SELECT query can refer to only one value.
Question 2SQL provides the AS keyword, which can be used to assign meaningful column names to the results of queries using the SQL built-in functions.
Question 3SQL is a programming language.
Question 4SELECT DISTINCT is used if a user wishes to see duplicate columns in a query.
Question 5Data manipulation language (DML) commands are used to define a database, including creating, altering, and dropping tables and establishing...
Question 6The keyword LIKE can be used in a WHERE clause to refer to a range of values.
Question 7The keyword BETWEEN can be used in a WHERE clause to refer to a range of values.