L2 Engineer

L2 Engineer Interview Questions and Answers for Freshers

Updated 22 Jun 2024

Q1. Can we delete the primary key?

Ans.

No, primary keys should not be deleted as they uniquely identify each record in a database.

  • Primary keys are essential for maintaining data integrity and ensuring uniqueness of records.

  • Deleting a primary key can lead to data inconsistencies and errors in the database.

  • If a primary key needs to be changed, it is better to update it rather than delete it.

Q2. Difference between drop and delete?

Ans.

Drop means to remove a database object, while delete means to remove data from a table.

  • Drop is used to remove an entire database object like a table, view, or database itself.

  • Delete is used to remove specific rows of data from a table.

  • Drop operation is irreversible and can lead to loss of data, while delete operation can be rolled back if within a transaction.

  • Example: DROP TABLE employees; DELETE FROM employees WHERE age > 50;

Q3. What are triggers?

Ans.

Triggers are special stored procedures in databases that are automatically executed or fired when certain events occur.

  • Triggers are used to maintain data integrity by enforcing business rules or automating actions.

  • They can be set to execute before or after an INSERT, UPDATE, or DELETE operation on a table.

  • Examples of triggers include auditing changes to a table, updating a related table when a record is inserted, or enforcing constraints.

L2 Engineer Jobs

Business Intel Engineer II, AOP 3-7 years
Amazon India Software Dev Centre Pvt Ltd
4.1
Hyderabad / Secunderabad
Business Intel Engineer II, GTS Field 2-5 years
Amazon India Software Dev Centre Pvt Ltd
4.1
Hyderabad / Secunderabad
Engineer II 0-3 years
American Express Company
4.2
Bangalore / Bengaluru
Are these interview questions helpful?
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 252 Interviews
3.3
 • 135 Interviews
4.1
 • 109 Interviews
4.0
 • 69 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

L2 Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter