SQL Tutorial for Beginners18- Create, Alter and Drop Function

Опубликовано: 09 Март 2023
на канале: 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✨...  
~-~~-~~~-~~-~


На этой странице сайта вы можете посмотреть видео онлайн SQL Tutorial for Beginners18- Create, Alter and Drop Function длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Learn Microsoft Fabric, Power BI, SQL Amit Chandak 09 Март 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 375 раз и оно понравилось 10 зрителям. Приятного просмотра!