In SQL, which command is used to remove a stored function from the database?

Assessment: JAMB UTME - Computer Studies - 2025 Subject: Computer Studies

Question 1 Report

In SQL, which command is used to remove a stored function from the database?

Answer Details

SQL keywords for managing database objects follow a consistent pattern: CREATE makes a new object, ALTER changes an existing one, and DROP removes it entirely from the database. A stored function is a database object, just like a table or a view, so the same removal keyword applies to it.

To permanently delete a stored function, the correct statement is DROP FUNCTION function_name;. This removes the function's definition from the database schema so it can no longer be called.

A common point of confusion is mixing up DROP with DELETE. In SQL, DELETE only removes rows of data from a table; it has no meaning when applied to a function, procedure, or other schema object. Words like "remove" or "erase" are plain English terms and are not valid SQL keywords at all.

Examination reminder: keep the distinction fixed in your mind: DROP removes objects (tables, functions, views, indexes), while DELETE removes rows of data within a table.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning