SQL Tutorial for Beginners18- Create, Alter and Drop Function

Publicado el: 09 marzo 2023
en el canal de: 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✨...  
~-~~-~~~-~~-~


En esta página del sitio puede ver el video en línea SQL Tutorial for Beginners18- Create, Alter and Drop Function de Duración hora minuto segunda en buena calidad , que subió el usuario Learn Microsoft Fabric, Power BI, SQL Amit Chandak 09 marzo 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 375 veces y le gustó 10 a los espectadores. Disfruta viendo!