SQL Class 17 : Table Valued Function (Zero to Pro in Database)| Microsoft SQL Server | in English

Veröffentlicht am: 15 Februar 2023
auf dem Kanal: Binary World - Debabrata Guha
146
6

We have already used some in built solutions in the following chapters.

We have used many String functions here    • SQL Class 10: String Functions (Zero ...  
We have also used many Datetime functions here    • SQL Class 07 : Using DateTime (Zero t...  

And we have also explored how to create user defined functions

   • SQL Class 16 : User Defined Function|...  

But in all the cases we have returned only 1 value. But now if we want to return more than one value, then we have to achieve that using table valued function. This special type of function will be returning multiple data in a form of table. Even at the calling time, we will call this function as a table. We will also try to check the advantages of table valued function over view and procedure.

Do not go for syntax. Initially syntax will be seemed tougher. But once you practice this for one or two times, you can feel it is logically that much easier to use.

:::::::::::::::::::::::: Course Links ::::::::::::::::::::::::::::::::::::

Link of the full playlist:

   • ULTIMATE SQL (Zero to Pro in Database...  

::::::::::::::::::::::::Few Key Information are as following:::::::::::::::::::::::::::::::

1. This course will be based on Microsoft SQL Server. But the focus is Database.

2. Language mode is English

3. This can be referred for any DBMS related syllabus including Engineering syllabus. But as per me it will go beyond of any syllabus.

4. Can be referred for job seeking purpose. Freshers or Experienced.

5. All the Exercises are available on the facebook Group "Binary World (Computer Science)" on the following link:
  / 331231161093613  

6. For any type of queries or solution copy please contact me at debabrataguha20@gmail.com

7. To know about me, you can visit to the following blog link: https://binaryworld-debabrataguha.blo...


:::::::::::::::::::::::::::::::::::::::: Queries to create the table ::::::::::::::::::::::::::
--drop table movie_Customers

create table movie_customers
(
customer_id int,
customer_name varchar(50),
gender Varchar(1),
movie_name varchar(100),
show_time datetime,
ticket_price numeric(5,2),
ticket_count int,
show_type varchar(10),
movie_hall varchar(100)
)

insert into movie_customers values
(101,'Divya','F','Avatar 2','2022-12-21 18:00:00.000',600,2,'3D','Cinepolis'),
(102,'Varun','M','Avatar 2','2022-12-21 18:00:00.000',600,1,'3D','Cinepolis'),
(103,'Ishaan','M','Babylon','2023-01-13 11:30:00.000',200,3,'2D','Cinepolis'),
(104,'Anand','M','Avatar 2','2022-12-25 19:45:00.000',700,4,'2D','Miraj Cinema'),
(105,'Ruchika','F','Pathaan','2023-02-01 10:40:00.000',250,6,'2D','PVR'),
(106,'Neesha','F','Black Adam','2022-10-20 20:05:00.000',230,2,'3D','PVR'),
(107,'Salena','F','Black Panther 2','2022-11-15 21:30:00.000',170,2,'2D','Inox'),
(108,'Naman','M','Avatar 2','2022-12-31 17:20:00.000',400,3,'3D','Inox'),
(103,'Ishaan','M','Jurassic World','2022-06-21 18:30:00.000',350,2,'2D','Uniworld'),
(109,'Anand','M','Dune','2021-12-11 18:00:00.000',200,1,'2D','Bioscope'),
(120,'Soma','F','No time to die','2021-11-23 19:10:00.000',null,3,'2D','Acropolis'),
(106,'Neesha','F','Pathaan','2023-01-26 22:00:00.000',300,2,'2D','Inox'),
(150,'Devika','F','Babylon','2023-01-27 09:00:00.000',150,2,'2D','Cinepolis')


select * from movie_customers


Auf dieser Seite können Sie das Online-Video SQL Class 17 : Table Valued Function (Zero to Pro in Database)| Microsoft SQL Server | in English mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Binary World - Debabrata Guha 15 Februar 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 146 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!