SQL Tutorial for Beginners18- Create, Alter and Drop Function

Veröffentlicht am: 09 März 2023
auf dem Kanal: Learn Microsoft Fabric, Power BI, SQL Amit Chandak
375
10

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✨...  
~-~~-~~~-~~-~


Auf dieser Seite können Sie das Online-Video SQL Tutorial for Beginners18- Create, Alter and Drop Function mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learn Microsoft Fabric, Power BI, SQL Amit Chandak 09 März 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 375 Mal angesehen und es wurde von 10 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!