MySQL Database Operations


  1. Which command is used to make a script file ‘run_me.sh’ executable?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The command name ‘chmod’ stands for ‘change mode’. It is used to define the way a file can be accessed. To make the script file ‘run_me.sh’ executable, the chmod command is used.


  1. Mysql cannot be used to execute script files.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Mysql is capable of reading input from a file in batch mode. This is also known as the non-interactive mode. A lot of typing and time can be saved when commands are stored in a file and executed from a file.



  1. In which file are the statements entered in ‘mysql’ saved?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Statements entered in ‘mysql’ are stored in the file named ‘.mysql_history’. This file is located in the home directory itself. The SQL statements can be directly pasted into this file.


  1. What is the table name in the following?
    INSERT INTO Employee VALUES('Rahul','M',NULL);











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The ‘INSERT INTO’ clause here inserts a row in the table named ‘student’. The table has three fields. The first field or attribute value in the row/tuple is ‘Kyle’. The second attribute value is ‘M’ and the last attribute is set to NULL.



  1. What is InnoDB in the following code?
    CREATE TABLE Employee (
    Emp_name CHAR(30),
    Emp_id INT,
    PRIMARY KEY (Emp_id)
    ) ENGINE = InnoDB;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    ‘InnoDB’ is the name of the ‘storage engine’ for the above table. The ‘ENGINE’ clause is used to specify the name of the storage engine that MySQL should use to handle the table being created. MySQL has several storage engines with its own properties.