Stored Procedure: Add Employee
Medium
Views, Procedures & Triggers
Create a stored procedure add_employee(name, salary) that inserts a new employee with the next available id and the given name and salary.
Table schema
Employees(id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50), salary INT)Sample data
Call: CALL add_employee('Asha', 50000);
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.