PCS Infotech Papers: Sample Questions 5 - 6 of 25

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 5

» Database » MySQL



Is the Following Statement True or False?

Trigger syntax declaration without the option for each row is legal




  • Trigger syntax declaration without the option for each row is legal.


  • A trigger is a special kind of a stored procedure that executes in response to certain action on the table like insertion, deletion or updation of data-it is executed automatically.

  • We can’t explicitly invoke triggers.

Types of triggers:

After Triggers

  • Run after insert, alter and delete.

  • Three types of AFTER trigger

    • AFTER INSERT Trigger

    • AFTER UPDATE Trigger

    • AFTER DELETE Trigger

    “Instead of” Trigger

  • Use as interceptor for any access to table view.

Types of triggers in image

Types of Triggers in Image

Types of triggers in image

Question number: 6

» Database » MySQL

Short Answer Question▾

Write in Short

How to write single quote in SQL?


  • A single quote contains actual data to be inserted.

  • Single quote with two quotes it not the double quote character but two single-quote characters.

  • The single quote character is reserved for inserting information into a database and if a single quote is contained in data, the command become corrupted.

  • So solve the problem, simply replace any single quote with two quotes.

  • Bellow sample command performs replacement automatically:

    • sContent = Replace (sContent, ” ’ “, ” ” “)

    • where sContent contains the data that needs single quotes replaced