Notes
![]() ![]() Notes - notes.io |
create Procedure spGetInstructorG
@MNId int,
@FnName nvarchar(50)
as
Begin
select * from Instructor where DepartmentId=@MNId
select * from Instructor where DepartmentName=@FnName
End
Declare @Instructor varchar(30)
Execute spGetInstructorG 2,'CSE'
print @Instructor
//
create Procedure spGetOrder2
@productID int,
@quantity nvarchar(50) Output
as
Begin
select @quantity=quantity from tblProducts where productID=@productID
End
Declare @quantity int
Execute spGetOrder2 5,@quantity out
print @quantity
///
insert into DepartmentTBL
values(1,'Cse','C prgmLab','Ajay'),
(2,'Ece','Matlab','sandeep'),
(3,'Ise','JavaLab','Bipin'),
(4,'eee','electricalLab','aman'),
(5,'civil','civilLab','Akash')
insert into Infrastructure
values(10,'Rolling','Circular','good'),
(11,'sufiyan','rctangular','amajing'),
(12,'heircil','Square','bad'),
(13,'malbern','triangular','fine')
insert into Lab
values(1,'CSE','Prakash'),
(2,'ECE','Ayan'),
(3,'ISE','Ankesh'),
(4,'CIV','Abdul'),
(5,'MEC','HIMANSHU')
INSERT into Students
values(21,'Arpit','PYTHON','Sharp'),
(22,'bholi','ASP','Expert'),
(23,'ajay','Dotnet','internediate'),
(24,'akash','c','begineer'),
(25,'nishant','developer','fluent')
insert into Teacher
values(30,'Rahul',789867898,'maths'),
(31,'anitesh',45678567,'english'),
(32,'sanskar',56789876,'science'),
(33,'somnath',45678656,'hindi'),
(34,'sidesh',23536787,'embedded')
insert into Theory
values(41,'DSA',23),
(42,'ENGNRG',29),
(43,'graphics',12),
(44,'Cad',16),
(45,'network',89)
insert into Course
values(51,'DATA STR','5:10:16.123',100),
(52,'FULL STACK','7:12:1.231',200),
(53,'BACKEND','3:12:23.123',300),
(54,'FRONTEND','12:12:13.123',400),
(55,'DOTNET','2:12:1.234',50)
Create Procedure SP_GetDepartment
AS
begin
select * from DepartmentTBL
end
exec SP_GetDepartment
Create Procedure SP_GetDeptNameByDeptID1
@depId int
as
Begin
select DeptName,DeptLab,DeptHead from DepartmentTBL where deptId=@depId
end
exec SP_GetDeptNameByDeptID1 4
Create Procedure SP_GetOutputByDeptHead
@deptmntHead nvarchar(20),
@DepmentName nvarchar(50) OUTPUT
as
begin
SELECT @DepmentName=DeptName from DepartmentTBL where DeptHead=@deptmntHead
end
declare @as nvarchar(30)
exec SP_GetOutputByDeptHead 'aman',@as out
print 'name of deprtment =' +@as
select * from DepartmentTBL
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team