12/21/22, 11:36 AM Prefinal Exam: Attempt review
Home / My courses / UGRD-IT6314-2212S / PRE FINAL EXAMINATION / Prefinal Exam
Started on Wednesday, 21 December 2022, 11:14 AM
State Finished
Completed on Wednesday, 21 December 2022, 11:35 AM
Time taken 21 mins 42 secs
Marks 48.00/50.00
Grade 96.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Select * from employee where salary>10000 and dept_id=101;
Which of the following fields are displayed as output?
Select one:
a. Salary
b. All the field of employee relation
c. Employee
d. Salary, dept_id
Question 2
Correct
Mark 1.00 out of 1.00
The "mysql_connect()" function opens a MySQL connection?
Select one:
True
False
Question 3
Correct
Mark 1.00 out of 1.00
To remove duplicate rows from the result set of a SELECT use the following keyword:
Select one:
a. NO DUPLICATE
b. None of the above
c. UNIQUE
d. DISTINCT
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 1/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 4
Correct
Mark 1.00 out of 1.00
It's a text function that returns convert string to lowercase
Select one:
a. Lower()
b. toLower()
c. LowerCase()
d. Lcase()
Question 5
Correct
Mark 1.00 out of 1.00
Function trims all spaces from the right of a value
Select one:
a. RightTrim()
b. Trim()
c. RTRIM()
d. Trims()
Question 6
Correct
Mark 1.00 out of 1.00
The INSERT INTO statement is not used to add new records to a database table?
Select one:
True
False
Question 7
Correct
Mark 1.00 out of 1.00
Which function used to get the current time in mysql?
Select one:
a. Time()
b. getTime()
c. NOW()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 2/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 8
Correct
Mark 1.00 out of 1.00
Insert into employee _____ (1002,Jeiven,2000);
In the given query which of the keyword has to be inserted ?
Select one:
a. Relation
b. Field
c. Values
d. Table
Question 9
Correct
Mark 1.00 out of 1.00
What will be the output of the following code? If say date is 16/04/2017.
Select one:
a. Today is 04-16-2017
b. Today is 16-04-2017
c. Today is 16April, 2017
d. Today is April 16, 2017
Question 10
Correct
Mark 1.00 out of 1.00
It's a function that is used to convert a human readable string to a Unix time.
Select one:
a. strstostime()
b. strtotime()
c. strtotimes()
d. sttotime()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 3/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 11
Correct
Mark 1.00 out of 1.00
Which one of the following databases has PHP supported almost since the beginning?
Select one:
a. MYSQL
b. SQL+
c. Oracle Database
d. SQL
Question 12
Correct
Mark 1.00 out of 1.00
The "or die()" part of a MySQL command will execute if the connection fails?
Select one:
True
False
Question 13
Correct
Mark 1.00 out of 1.00
Which one of the following function is useful for producing a timestamp based on a given date and time.
Select one:
a. time()
b. mktime()
c. mrtime()
d. mtime()
Question 14
Correct
Mark 1.00 out of 1.00
The "mysql_error()" function returns the error description for a MYSQL operation?
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 4/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 15
Incorrect
Mark 0.00 out of 1.00
Assuming the table and fields below exists, what is wrong with the following mysql query example:
mysql_query("INSERT INTO contacts (firstName, lastName)
VALUES ('Robert', 'Smith', '123-983-2929')");
Select one:
a. There are more fields than values
b. Nothing, everything is fine
c. There are more values than fields
Question 16
Correct
Mark 1.00 out of 1.00
Which of the following returns the numbers of rows in a column?
Select one:
a. count()
b. return_count();
c. counting()
d. counts()
Question 17
Correct
Mark 1.00 out of 1.00
Its joining values together (by appending them to each other) to form a single long value.
Select one:
a. adding
b. joining
c. concatenating
d. appending
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 5/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 18
Correct
Mark 1.00 out of 1.00
Assuming the table and fields below exists, what is wrong with the following mysql query example:
mysql_query("INSERT INTO contacts (firstName, lastName, phoneNumber)
VALUES ('Robert', 'Smith', '123-983-2929')");
Select one:
a. There are more values than fields
b. Nothing, everything is fine
c. There are more fields than values
Question 19
Correct
Mark 1.00 out of 1.00
The "mysql_close()" function allows you to close a MySQL connection?
Select one:
True
False
Question 20
Correct
Mark 1.00 out of 1.00
This function allows you to close the current connection.
Select one:
a. closed();
b. close_database();
c. mysql_close();
d. close();
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 6/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 21
Correct
Mark 1.00 out of 1.00
This are functions that operate on a set of rows to calculate and return a single value.
Select one:
a. COUNT()
b. AVG()
c. Aggregate functions
d. ABS()
Question 22
Correct
Mark 1.00 out of 1.00
MySQL runs on which operating systems?
Select one:
a. Linux and Mac OS-X only
b. Unix and Linux only
c. Any operating system at all
d. Unix, Linux, Windows and others
Question 23
Correct
Mark 1.00 out of 1.00
Converts text to uppercase
Select one:
a. Upper()
b. UCases()
c. UpperCases()
d. UpperCase()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 7/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 24
Correct
Mark 1.00 out of 1.00
Which one of the following statements is used to create a table?
Select one:
a. CREATE table_name (column_typecolumn_name);
b. CREATE TABLE table_name (column_namecolumn_type);
c. CREATE TABLE table_name (column_typecolumn_name);
d. CREATE table_name (column_namecolumn_type);
Question 25
Correct
Mark 1.00 out of 1.00
Function is used to convert a human readable string to a Unix time.
Select one:
a. strtime()
b. totime()
c. strtotime()
d. time()
Question 26
Correct
Mark 1.00 out of 1.00
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.
Select one:
a. From, select
b. Where, from
c. Select, from
d. From, where
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 8/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 27
Correct
Mark 1.00 out of 1.00
Joining values together (by appending them to each other) to form a single long value.
Select one:
a. appending
b. join
c. concatenations
d. concatenate
Question 28
Correct
Mark 1.00 out of 1.00
Is the SQL statement correct or not.
SELECT vend_name, prod_name, prod_price, vendors.vend_id, products.vend_id
FROM vendors INNER JOINS products
ON vendors.vend_id = products.vend_id;
Select one:
a. No
b. Yes
Question 29
Correct
Mark 1.00 out of 1.00
Returns the highest value
Select one:
a. MAX()
b. MAXXES()
c. MAX_VALUE()
d. MAXS()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 9/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 30
Correct
Mark 1.00 out of 1.00
One of the parameters to represent the day of the month
Select one:
a. days
b. day
c. d
d. D
Question 31
Correct
Mark 1.00 out of 1.00
It's a function that formats a timestamp to a more readable date and time.
Select one:
a. time()
b. dates()
c. date()
d. dateTime()
Question 32
Correct
Mark 1.00 out of 1.00
Which one of the following methods is responsible for sending the query to the database?
Select one:
a. sendquery()
b. query_send()
c. query()
d. send_query()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 10/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 33
Correct
Mark 1.00 out of 1.00
It's a function that returns the lowest value in a column.
Select one:
a. Low()
b. Lowest()
c. Minimum()
d. Min()
Question 34
Correct
Mark 1.00 out of 1.00
Which of the following statements contains an error?
Select one:
a. Select empid from emp;
b. Select empid from emp where empid = 10006;
c. Select * from emp where empid = 10003;
d. Select empid where empid = 1009 and lastname = ‘JOHANN;
Question 35
Correct
Mark 1.00 out of 1.00
The date() function returns ___ representation of the current date and/or time.
Select one:
a. String
b. Integer
c. Boolean
d. Float
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 11/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 36
Correct
Mark 1.00 out of 1.00
This command sends active query to the database
Select one:
a. mysql_queries();
b. query();
c. my_query();
d. mysql_query()
Question 37
Correct
Mark 1.00 out of 1.00
It's a function returns the Unix timestamp for a date.
Select one:
a. d()
b. date ()
c. mktime()
d. dates()
Question 38
Correct
Mark 1.00 out of 1.00
Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query
Select one:
a. affected_rows()
b. changed_rows()
c. new_rows()
d. num_rows()
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 12/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 39
Correct
Mark 1.00 out of 1.00
The "I" in MySQLi stands for
Select one:
a. increase
b. improvement
c. improved
d. improve
Question 40
Correct
Mark 1.00 out of 1.00
In a LIKE clause, you can could ask for any value ending in "qpt" by writing
Select one:
a. LIKE *ton
b. LIKE %qpt
c. LIKE ton$
d. LIKE ^.*ton$
Question 41
Correct
Mark 1.00 out of 1.00
Which of the following can add a row to a table?
Select one:
a. Alter
b. Insert
c. Add
d. Update
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 13/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 42
Correct
Mark 1.00 out of 1.00
MySQL is
Select one:
a. A Relational Database Management System
b. A Programming language
c. A technique for writing reliable programs
Question 43
Correct
Mark 1.00 out of 1.00
This is Employee table.
Select * from employee where employee_id>1009;
Which of the following employee_id will be displayed?
Select one:
a. 1009, 1018
b. 1018
c. 1009, 1001, 1018
d. 1001
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 14/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 44
Correct
Mark 1.00 out of 1.00
What will be the output of the following PHP code? If say date is 16/04/2017.
Select one:
a. April
b. 2017
c. 16
d. 30
Question 45
Correct
Mark 1.00 out of 1.00
Which one of the following statements should be used to include a file?
Select one:
a. include 'filename';
b. #include ;
c. @include 'filename';
d. #include ‘filename’;
Question 46
Incorrect
Mark 0.00 out of 1.00
The result of a SELECT statement can contain duplicate rows.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 15/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Question 47
Correct
Mark 1.00 out of 1.00
Function that select database.
Select one:
a. my_db_select();
b. mysql_select_db();
c. select_db();
Question 48
Correct
Mark 1.00 out of 1.00
Assuming the table and fields below exists, what is wrong with the following mysql query example: mysql_query("INSERT INTO contacts
(firstName, lastName, phoneNumber) VALUES ('Robert', 'Smith')");
Select one:
a. Nothing, everything is fine
b. There are more values than fields
c. There are more fields than values
Question 49
Correct
Mark 1.00 out of 1.00
If a PHP script opens a MySQL connection, the script will automatically close the connection after the script has finished executing?
Select one:
True
False
Question 50
Correct
Mark 1.00 out of 1.00
A NULL value is treated as a blank or 0.
Select one:
True
False
◀︎Midterm Exam
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 16/17
12/21/22, 11:36 AM Prefinal Exam: Attempt review
Jump to...
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=113906&cmid=5279 17/17