Learn SQL, How to use Create, Alter, and Drop Functions. #sql, #rdbms, #table, #amitchandakda #interviewquestions #interview #index
In this comprehensive SQL series, you'll learn the basics of SQL from scratch. Whether you're a complete beginner or looking to refresh your skills, this tutorial covers everything you need to know, from SQL queries and functions to creating, altering, and dropping functions. You'll also explore SQL Server databases and get hands-on experience with SQL through examples and exercises. Get started today and become a proficient SQL user!
SQL Tutorial 18- Create, Alter, and Drop Function
Definition Source: Google Search, Wikipedia, IBM, W3School, ChatGPT
00:00 Introduction
00:30 What is a Function
02:30 Procedure vs Function
04:00 Create Function
09:40 Alter Function
13:30 Drop Function
SQL Tutorial 17- Create, Alter, and Drop Procedure: • SQL Tutorial 17- Create, Alter and Drop Pr...
create function test_len(@input as varchar(50))
returns int
begin
return len(@input) ;
end;
select dbo.test_len('Testing code');
create function test_qty(@item as int)
returns int
begin
declare @return_value int;
select @return_value = sum(qty) from sales;
return @return_value
end;
select dbo.test_qty(1) ;
alter function test_qty(@item as int)
returns int
begin
declare @return_value int;
select @return_value = sum(qty) from sales where item_id = @item;
return @return_value
end;
select dbo.test_qty(1) ;
create function test_sql(@item as int)
returns TABLE
return select * from sales where Item_ID = @item;
select sum(Qty) from dbo.test_sql(1) ;
drop function dbo.test_len
select dbo.test_len('Testing code');
~-~~-~~~-~~-~
Please watch: "Microsoft Power BI Tutorial For Beginners✨ | Power BI Full Course 2023 | Learn Power BI"
• Microsoft Power BI Tutorial For Beginners✨...
~-~~-~~~-~~-~
On this page of the site you can watch the video online SQL Tutorial for Beginners18- Create, Alter and Drop Function with a duration of hours minute second in good quality, which was uploaded by the user Learn Microsoft Fabric, Power BI, SQL Amit Chandak 09 March 2023, share the link with friends and acquaintances, this video has already been watched 375 times on youtube and it was liked by 10 viewers. Enjoy your viewing!