My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Monday, 27 November 2017
Learn Sql server in hindi/urdu part-14(Union and Union All)
--The UNION operator is used to combine the result-set of two or more SELECT statements.
--Each SELECT statement within UNION must have the same number of columns
--The columns must also have similar data types
--The columns in each SELECT statement must also be in the same order
create table tblIndiaCustomers
(
id int identity,
Name nvarchar(20),
email nvarchar(20)
)
create table tblUKCustomers
(
id int identity,
Name nvarchar(20),
email nvarchar(20)
)
insert into tblIndiaCustomers
values('Aditi','Aditi@yahoo.com')
insert into tblIndiaCustomers
values('Rahul','Rahul@yahoo.com')
insert into tblIndiaCustomers
values('Sundar','Sundar@yahoo.com')
insert into tblIndiaCustomers
values('Ganesh','Ganesh@yahoo.com')
----------------------------------------
insert into tblUKCustomers
values('Mark','Mark@hotmail.com')
insert into tblUKCustomers
values('Ben','Ben@hotmail.com')
insert into tblUKCustomers
values('Linda','Linda@hotmail.com')
insert into tblUKCustomers
values('Suzan','Suzan@hotmail.com')
----------------------------------
select * from tblIndiaCustomers
union
select * from tblUKCustomers
select * from tblIndiaCustomers
union all
select * from tblUKCustomers
Learn Sql server in hindi/urdu part-13 (Delete and Update using Store Pr...
create proc delete_employee
(
@emp_id int
)
as
begin
delete from employee where emp_id=@emp_id
end
execute delete_employee 3011
create proc update_employee
(
@emp_id int,
@emp_salary int,
@emp_address nvarchar(100),
@emp_dept_id int
)
as
begin
update employee
set emp_salary=@emp_salary , emp_address=@emp_address ,dem_deptid=@emp_dept_id where emp_id=@emp_id
end
select * from employee
execute update_employee 2003,40000,'R-32 sector sec-11',2
Wednesday, 22 November 2017
Learn Sql server in hindi/urdu part-11(Group by in Sql server)
select count(emp_id),emp_salary from employee group by emp_salary
select count(e.emp_id) as 'Total Employees', d.dept_name from employee e inner join department d on d.dept_id=e.dem_deptid
group by d.dept_name having count(e.emp_id) >3
Tuesday, 21 November 2017
Snake Ladder Game in windows Form C# (PART-1)
Load event:
pictureBox3.Image
= Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\roll.png");
= Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\roll.png");
pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;
roll dice button:
label2.Text = logics.rolldice(pictureBox3).ToString();
class:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
class logics
{
public static int rolldice(PictureBox px)
{
int dice = 0;
Random r = new Random();
dice = r.Next(1, 7);
px.Image = Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\" + dice + ".png");
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\" + dice + ".png");
px.SizeMode = PictureBoxSizeMode.StretchImage;
return dice;
} //roll dice
method end................
method end................
}
}
Friday, 17 November 2017
Learn Sql server in hindi/urdu part-10 (Like and WildCards in sql Server)
select *from employee
insert into employee values('Abid',15000,1)
select * from employee where emp_name like 'A%'
select * from employee where emp_name like '%a'
select * from employee where emp_name like '%a%n'
select * from employee where emp_name like '__n%'
select * from employee where emp_name like 's_%'
select * from employee where emp_name like 's%a'
Learn Sql server in hindi/urdu part-9 (Sum ,Top and Subquery on differen...
select * from employee
select * from department
--display top 3 records from employee table.
select top 2 * from employee where emp_id < (select max(emp_id) from employee) order by emp_salary desc
select * from employee order by emp_salary asc
--dispaly sum of salary of those employees who are working in Marketing department
select sum(emp_salary) from employee e inner join department d on d.dept_id=e.dem_deptid
where d.dept_name='Marketing'
--display top 5 records of employees who are working in Hr and Marketing
select top 5 * from employee e inner join department d on d.dept_id=e.dem_deptid
where d.dept_name='Marketing' or d.dept_name='Hr'
Learn Sql server in hindi/urdu part-8 Aggregate function with inner joi...
use sql1707b1
select * from sys.tables
select * from employee
select * from department
--display maximum salary from employee table
select max(emp_salary)from employee
--display minimum salary from employee table
select min(emp_salary) from employee
--display avg salary from employee table
select avg(emp_salary) from employee
--display no.of employees record from employee table
select count(emp_id) from employee
--display, how many employees are working in Hr Department with salary >10000
select count(e.emp_id) from employee e inner join
department d on d.dept_id=e.dem_deptid where e.emp_salary>10000 and d.dept_name='HR'
;
Thursday, 16 November 2017
Learn Sql server in hindi/urdu part-7 (Left & right Join in Sql Server)
create table department
(
dept_id int identity primary key,
dept_name nvarchar(20) not null,
)
select * from department
insert into department
values('Hr')
insert into department
values('Admin')
insert into department
values('Marketing')
insert into department
values('Faculty')
insert into department
values('Managers')
create table employee
(
emp_id int identity primary key,
emp_name nvarchar(20) not null,
emp_salary int,
dem_deptid int foreign key references department(dept_id)
)
insert into employee
values('Ali',40000,3)
insert into employee
values('Ali',30000,1)
insert into employee
values('sami',50000,2)
insert into employee
values('sana',20000,2)
insert into employee
values('kamran',70000,4)
insert into employee
values('sumaira',10000,1)
insert into employee
values('moosa',10000,10)
select * from employee
select * from department
select e.emp_id,e.emp_name,e.emp_salary,d.dept_name,d.dept_id,e.dem_deptid from
employee e inner join department d on d.dept_id=e.dem_deptid
select * from department d inner join employee e on d.dept_id=e.dem_deptid
select * from department d left join employee e on d.dept_id=e.dem_deptid
select * from employee e right join department d on d.dept_id=e.dem_deptid
Learn Sql server in hindi/urdu part-6 (Inner Join in Sql Server)
create table department
(
dept_id int identity primary key,
dept_name nvarchar(20) not null,
)
select * from department
insert into department
values('Hr')
insert into department
values('Admin')
insert into department
values('Marketing')
insert into department
values('Faculty')
insert into department
values('Managers')
create table employee
(
emp_id int identity primary key,
emp_name nvarchar(20) not null,
emp_salary int,
dem_deptid int foreign key references department(dept_id)
)
insert into employee
values('Ali',40000,3)
insert into employee
values('Ali',30000,1)
insert into employee
values('sami',50000,2)
insert into employee
values('sana',20000,2)
insert into employee
values('kamran',70000,4)
insert into employee
values('sumaira',10000,1)
insert into employee
values('moosa',10000,10)
select * from employee
select * from department
select e.emp_id,e.emp_name,e.emp_salary,d.dept_name,d.dept_id,e.dem_deptid from
employee e inner join department d on d.dept_id=e.dem_deptid
select * from department d inner join employee e on d.dept_id=e.dem_deptid
Tuesday, 14 November 2017
5- Variables in JavaScript (Diffrence b/w strongly type and loosely type...
<!DOCTYPE
html>
html>
<html>
<body>
<h1>Demo: JavaScript Variables
</h1>
</h1>
<p id="p1"></p>
<script>
var
one =1; // number value
one =1; // number value
one= 1.1; //
decimal value
decimal value
one = true; // Boolean value
one = null; // null value
one = 'one'; // string value
document.getElementById("p1").innerHTML
= one;
= one;
</script>
</body>
</html>
Monday, 13 November 2017
Learn Sql server in hindi/urdu part-4 (Alter Table ,Update Table and Whi...
alter table student
add dateofadmission date
select * from student
update student
set dateofadmission='11/14/2016'
where id in (2,4)
Declare @Number int
Set @Number = 1008
While(@Number <= 1010)
Begin
update student
set dateofadmission='11/11/2016'
where id =@Number
Set @Number = @Number + 1
End
insert into student(name,batchcode,contactnumber,dateofadmission)
values('xyz','14b2v1','090078601',GETDATE())
select * from student
Learn Sql server in hindi/urdu part-4 (Not Operator and Order By Clause)
select * from student --display all data
select id,name,contactnumber from student --display selected column
select * from student where batchcode='1208c1' -- where clause with one column
select * from student where name='emad' and batchcode='1708c1' and id=1003 --where clause with and operator
select * from student where batchcode='1708c1' or batchcode='120c1'
select * from student order by name desc
select * from student order by name asc
select * from student order by id desc
select * from student where batchcode!='1707b1' and batchcode!='1610c1'
select * from student where batchcode!='1707b1' or batchcode!='1610c1'
select * from student where batchcode not in ('1707b1','1610c1','1502c1')
select * from student where id not in (1002,1003,1004,2,4)
Friday, 10 November 2017
Learn Sql server in hindi/urdu part-2 (Constraints ,not null ,unique, id...
create database sql1707b1
use sql1707b1
create table student
(
id int primary key identity,
name nvarchar(20) not null,
batchcode nvarchar(20) not null,
contactnumber nvarchar(20) not null unique
)
insert into student (name,batchcode,contactnumber)
values('safeer','1707b1','03425321680')
insert into student (name,batchcode,contactnumber)
values('naseer','1707b1','03415321680')
delete from student --deleting record..........
drop table student
select * from student
select * from student where id=1
Learn Sql server in hindi part-1 (create database,use database,create ta...
create database sql1707b1
use sql1707b1
create table student
(
id int,
name nvarchar(20),
batchcode nvarchar(20),
contactnumber nvarchar(20)
)
select * from student
insert into student (id,name,batchcode,contactnumber)
values(1,'sahil','1707b1','03425321680')
insert into student (id,name,batchcode,contactnumber)
values(2,'Hammad','1707b1','03424323680')
insert into student (id,name,batchcode,contactnumber)
values(3,'AbuZar','1707b1','03413325581')
Subscribe to:
Posts (Atom)
Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...