NEW
Font size
WorksheetsMySQL & PHP Basic MCQs
Total questions: 20
Worksheet time: 7mins
Which command is used to create a new database?
CREATE NEW DATABASE dbname;
MAKE DATABASE dbname;
CREATE DATABASE dbname;
ADD DATABASE dbname;
Which command is used to remove a database?
DROP DATABASE dbname;
DELETE DATABASE dbname;
REMOVE DATABASE dbname;
DESTROY DATABASE dbname;
Which statement is used to retrieve data from a database?
FIND
GET
SELECT
RETRIEVE
Which keyword is used to sort the result set in ascending order?
ORDER BY ASC
SORT ASC
ASCEND
SORT BY
Which function is used to count rows?
COUNT()
SUM()
ROWS()
TOTAL()
Which SQL statement is used to add new data to a table?
INSERT INTO
ADD TO
UPDATE
APPEND
Which SQL keyword is used to update existing data?
CHANGE
MODIFY
UPDATE
ALTER
Which command is used to delete a table completely?
DELETE TABLE
DROP TABLE
REMOVE TABLE
DESTROY TABLE
Which SQL statement is used to prevent duplicate rows?
DISTINCT
UNIQUE
PRIMARY
KEY
Which SQL clause is used to filter records?
WHERE
FILTER
HAVING
CHECK
PHP stands for:
Personal Home Page
Private Home Page
Preprocessor Home Page
PHP Hypertext Program
Which symbol is used to declare variables in PHP?
#
$
@
%
Which of the following is used to output data in PHP?
echo
printf
println
console.log
Which function is used to connect to a MySQL database in PHP (MySQLi)?
mysqli_connect()
mysql_connect()
connect_db()
db_connect()
Which function is used to include a file in PHP?
require()
include()
require_once()
All of the above
Which of the following is a PHP superglobal variable?
$_POST
$_GET
$_SESSION
All of the above
What will echo 5 . 3; output in PHP?
8
53
15
Error
Which operator is used for string concatenation in PHP?
+
.
&
*
Which function is used to get the length of a string in PHP?
strlen()
length()
size()
strlength()
Which function is used to get the current date in PHP?
time()
date()
current_date()
now()
