Subqueries in sql Part 59

C#, SQL Server, WCF, MVC and ASP .NET video tutorials for beginners In this video we will discuss about subqueries in sql server. Let us understand subqueris with an example. Please create the required tables and insert sample data using the script below. Create Table tblProducts ( [Id] int identity primary key, [Name] nvarchar(50), [Description] nvarchar(250) ) Create Table tblProductSales ( Id int primary key identity, ProductId int foreign key references tblProducts(Id), UnitPrice int, QuantitySold int ) Insert into tblProducts values (’TV’, ’52 inch black color LCD TV’) Insert into tblProducts values (’Laptop’, ’Very thin black color acer laptop’) Insert into tblProducts values (’Desktop’, ’HP high performance desktop’) Insert into tblProductSales values(3, 450, 5) Insert into tblProductSales values(2, 250, 7) Insert into tblProductSales values(3, 450, 4) Insert into tblProductSales values(3, 450, 9) Write a query to retrieve products that are n
Back to Top