PHP MySQL Basic Test

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By JAI KALE
J
JAI KALE
Community Contributor
Quizzes Created: 1 | Total Attempts: 2,217
Questions: 10 | Attempts: 2,286

SettingsSettingsSettings
PHP MySQL Basic Test - Quiz


Questions and Answers
  • 1. 

    pHP is Scripting language

    • A.

      Browser Side

    • B.

      Server Side

    • C.

      Home Side

    • D.

      Client Side

    Correct Answer
    B. Server Side
    Explanation
    PHP is a server-side scripting language, which means that it is executed on the server before the webpage is sent to the client's browser. This allows PHP to interact with databases, process form data, and generate dynamic content on the server before sending it to the user. Unlike client-side scripting languages like JavaScript, PHP code cannot be viewed or modified by the client, making it more secure for handling sensitive data and server-side operations. Therefore, the correct answer is "Server Side".

    Rate this question:

  • 2. 

    In pHP in order to access MySQL database you will use:

    • A.

      Mysqlconnect() function

    • B.

      Mysql-connect() function

    • C.

      Mysql_connect() function

    • D.

      Sql_connect() function

    Correct Answer
    C. Mysql_connect() function
    Explanation
    The correct answer is mysql_connect() function. This function is used in PHP to establish a connection with a MySQL database. It takes parameters such as server name, username, password, and database name to establish the connection. Once the connection is established, it allows PHP to interact with the MySQL database and perform various operations such as querying, inserting, updating, and deleting data.

    Rate this question:

  • 3. 

    The ............. statement is used to delete a table.

    • A.

      DROP TABLE

    • B.

      DELETE TABLE

    • C.

      DEL TABLE

    • D.

      REMOVE TABLE

    Correct Answer
    A. DROP TABLE
    Explanation
    The DROP TABLE statement is used to delete a table.

    Rate this question:

  • 4. 

    Is [SQL is not case sensitive. SELECT is the same as select.] true or false?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    SQL is not case sensitive, meaning that the keywords and identifiers in SQL statements can be written in any case and will be treated the same. In this case, "SELECT" and "select" are considered equivalent and will produce the same result. Therefore, the statement "SQL is not case sensitive. SELECT is the same as select" is true.

    Rate this question:

  • 5. 

    Transactions are used to treat sets of SQL statements atomically.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Transactions in SQL are used to ensure that a set of SQL statements are executed as a single, indivisible unit. This means that either all the statements within the transaction are successfully executed, or none of them are executed at all. This helps maintain data integrity and consistency in the database. By treating a set of SQL statements atomically, transactions allow for rollback and recovery in case of failures or errors during the execution of the statements. Therefore, the given answer "True" is correct.

    Rate this question:

  • 6. 

    Which of the following can add a row to a table?

    • A.

      Alter

    • B.

      Add

    • C.

      Insert

    • D.

      Update

    Correct Answer
    C. Insert
    Explanation
    The INSERT statement is used to add a row to a table in a database. It allows the user to specify the values for each column in the new row, or to select values from another table to insert. The ALTER statement is used to modify the structure of a table, such as adding or removing columns, but it does not add rows. The ADD statement is not a valid SQL statement. The UPDATE statement is used to modify existing rows in a table, but it does not add new rows. Therefore, the correct answer is INSERT.

    Rate this question:

  • 7. 

    MySQL runs on which operating systems?

    • A.

      Unix and Linux only

    • B.

      Linux and Mac OS-X only

    • C.

      Unix, Linux, Windows and others

    • D.

      None of these

    Correct Answer
    C. Unix, Linux, Windows and others
    Explanation
    MySQL is a widely used relational database management system that is compatible with various operating systems. It can run on Unix, Linux, Windows, and other operating systems. This makes it a versatile choice for different environments and allows users to choose the operating system that best suits their needs.

    Rate this question:

  • 8. 

    Following are Open Source Technologies

    • A.

      PHP

    • B.

      Mysql

    • C.

      Linux

    • D.

      ASP.Net

    Correct Answer(s)
    A. pHP
    B. Mysql
    C. Linux
    Explanation
    PHP, MySQL, and Linux are all examples of open source technologies. Open source refers to software that is freely available to use, modify, and distribute. PHP is a popular scripting language used for web development, MySQL is a widely used open source database management system, and Linux is an open source operating system. These technologies have a large community of developers who contribute to their improvement and provide support, making them accessible and customizable for users. ASP.Net, on the other hand, is a Microsoft framework and is not open source.

    Rate this question:

  • 9. 

    DML Commands are

    • A.

      Alter

    • B.

      Update

    • C.

      Add

    • D.

      Select

    Correct Answer(s)
    B. Update
    D. Select
    Explanation
    The given list includes DML (Data Manipulation Language) commands, which are used to manipulate data in a database. "Update" is a DML command that allows modifying existing data in a table, while "select" is used to retrieve data from a table. Therefore, both "update" and "select" are correct answers as they are valid DML commands.

    Rate this question:

  • 10. 

    Primary Key does allow the Null Values. where as in Unique key doesn’t accept the Null values.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The given statement is incorrect. In a database, a primary key does not allow null values, while a unique key does allow null values. A primary key is a column or a combination of columns that uniquely identifies each row in a table. It is used to enforce data integrity and ensure uniqueness. On the other hand, a unique key also enforces uniqueness but allows null values.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 17, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 21, 2020
    Quiz Created by
    JAI KALE
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.