0% found this document useful (0 votes)
9 views18 pages

RDBMS Quiz 1

The document is a quiz on MySQL, covering various statements and commands used in the relational database system. It includes questions about updating, deleting, selecting, and inserting data, as well as constraints and operators. The quiz tests knowledge on syntax and functionality specific to MySQL commands.

Uploaded by

loloo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views18 pages

RDBMS Quiz 1

The document is a quiz on MySQL, covering various statements and commands used in the relational database system. It includes questions about updating, deleting, selecting, and inserting data, as well as constraints and operators. The quiz tests knowledge on syntax and functionality specific to MySQL commands.

Uploaded by

loloo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

MySQL

Quiz - 1
What is MySQL?
 Developed, distributed and supported by OracleCorp

 A relational Database system

 Cross-platform, opensource and free

 All options are correct


Which MySQL statement is used to
update data in a database?
 Save

 Insert

 Update

 Modify
Which MySQL statement is used to
delete data from a database?
 Remove

 Delete

 Collapse
Which MySQL statement is used to
select data from a database?
 Select

 Open

 Get

 Extract
Which MYSQL statement is used to
insert new data in a database?
 Insert new

 Add record

 Add new

 Insert into
With MySQL, how do you select a column named
"FirstName" from a table named "Persons"?

 Extract FirstName from Persons

 Select FirstName from persons

 Select Persons.FirstName
With MySQL, how do you select all the
columns from a table named "Persons"?

 Select * .Persons

 Select [all] from persons

 Select Persons

 Select * from persons


With MySQL, how do you select all the records from
a table named "Persons" where the value of the
column "FirstName" is "Peter"?

 Select * from Persons where FirstName=‘Peter’

 Select * from Persons where FirstName<>‘Peter’

 Select * from Persons where FirstName like ‘Peter’


With MySQL, how do you select all the records from a
table named "Persons" where the value of the column
"FirstName" starts with an "a"?

 Select * from Persons where FirstName=‘a’

 Select * from Persons where FirstName like ‘%a’

 Select * from Persons where FirstName like ‘a%’

 Select * from Persons where FirstName like ‘a*’

 Select * from Persons where FirstName like ‘*a’


The OR operator displays a record if ANY conditions listed are true.
The AND operator displays a record if ALL of the conditions listed are
true

 False
 True
With MySQL, how do you select all the records from a table named
"Persons" where the "FirstName" is "Peter" and the "LastName" is
"Jackson"?

 Select firstName=‘Peter’,lastName=‘Jackson’ from Persons

 Select * from Persons where firstName=‘Peter’ and lastName=‘Jackson’


Which MySQL statement is used to return only
different values?

 Select different

 Select distinct

 Select unique
Which MySQL keyword is used to sort the result-set?

 Order by

 Sort

 Sort by

 order
With MySQL, how can you return all the records from a
table named "Persons" sorted descending by "FirstName"?

 Select * from Persons sort by ‘FirstName’ desc

 Select * from Persons order ‘FirstName’ desc

 Select * from Persons sort ‘FirstName’ desc

 Select * from Persons order by ‘FirstName’ desc


With MySQL, how can you delete the records where
the "FirstName" is "Peter" in the Persons Table?

 Delete row firstName=‘Peter’ from Persons

 Delete from Persons where firstName=‘Peter’

 Delete FirstName=‘Peter’ from Persons


With MySQL, how can you return the number of
records in the "Persons" table?

 Select count(*) from Persons

 Select columns(*) from persons

 Select len(*) from persons


The NOT NULL constraint enforces a column to not
accept NULL values.

 False
 True

You might also like