Saturday, 21 February 2015
Saturday, 14 February 2015
HTML code for user profile page
program:
<html>
<head>
<title>User profile</title>
</head>
<body bgcolor="#abcdef">
<h3 align="center">User profile</h3>
<form name="profile-form" method="post">
NAME
<input type="text" name="uname" value="ganesh venkata" size="30" maxlength="20"><br>
PASSWORD
<input type="password" name="pwd" value="******" size="15"<br>
EMAIL
<input type="text" name="email" value="ganeshmuppallasv@gmail.com" size="20"<br>
PHONE NUMBER
<input type="text" name="phno" value="1234567890" size="15" maxlength="10"><br>
<pre>
GENDER
male<input type="radio" name="gender" value="male" checked>
female<input type="radio" name="gender" value="female">
</pre>
<br>
DATE OF BIRTH
Sunday, 8 February 2015
Create a table using HTML
Program:
<html>
<head>
<title> To create a table model</title>
</head>
<body>
Wednesday, 14 January 2015
PL/SQL program to create employe table and insert employment number, name, salary. If it is above 30000 don't perform update operation
Create employee table
Sql>create table employee(empno varchar2(20),ename varchar2(20),sal number(8,2));
Insert data into employee table
Sql>insert into employee('1001','bcd',10000);
Sql>insert into employee('1002','abc','1000);
Sql>insert into employee('1003','xyz',5000);
Sql>insert into employee('1004','gani',5000);
Declare
emp_no varchar2(20);
upd_sal number(5);
total_sal number(8,2);
begin
emp_no:='&emp_no';
upd_sal:='&upd_sal';
Insert into employee values('1005','ganesh', 2000);
savepoint no_update;
update employee set_sal=sal+upd_sal where empno=emp_no;
select sum(sal) into total_sal from employee;
if total_sal>30000 then
rollback to savepoint no_update;
dbms_output.put_line('no update, we are exceeding the total salary 30000) ;
else
dbms_output.put_line('salary updated successfully to the account:'|| emp_no) ;
end if;
end;
/
Create your own website
Sql>create table employee(empno varchar2(20),ename varchar2(20),sal number(8,2));
Insert data into employee table
Sql>insert into employee('1001','bcd',10000);
Sql>insert into employee('1002','abc','1000);
Sql>insert into employee('1003','xyz',5000);
Sql>insert into employee('1004','gani',5000);
Program
Declare
emp_no varchar2(20);
upd_sal number(5);
total_sal number(8,2);
begin
emp_no:='&emp_no';
upd_sal:='&upd_sal';
Insert into employee values('1005','ganesh', 2000);
savepoint no_update;
update employee set_sal=sal+upd_sal where empno=emp_no;
select sum(sal) into total_sal from employee;
if total_sal>30000 then
rollback to savepoint no_update;
dbms_output.put_line('no update, we are exceeding the total salary 30000) ;
else
dbms_output.put_line('salary updated successfully to the account:'|| emp_no) ;
end if;
end;
/
Create your own website
Click here
Friday, 9 January 2015
Pl/sql program to debit the amount and check the minimum bal 500 while debiting the account
Sql>Create table account(name varchar2(20),anumber varchar2(15),bal number(8,2));
Output: Table created
Sql>insert into account values('abc','101',5000);
Output: row inserted
Sql>insert into account values('abcd','102',500);
Output: row inserted
Sql>insert into account values('ganesh','103',3000);
Output: row inserted.
Sql>insert into account values('raju','104',1000);
Output: row inserted
Sql>insert into account values('gani','105',9000);
Output: row inserted.
declare
acct _bal number(8,2);
acct_no varchar2(15);
debit_amt number(5);
min_bal Number(5);=500;
begin
acct_no:=&acct_no;
debit_amt:=&debit_amt;
select bal into acct_bal from account
where anumber=acct_no;
acct_bal:=acct_bal-debit_amt;
if acct_bal>=min_bal then
update account set bal=bal-debit_
amt where anumber:=acct_no;
else
dbms_output.put_line('insufficient
bal in the output ');
end if;
end;
/
Output: Table created
Sql>insert into account values('abc','101',5000);
Output: row inserted
Sql>insert into account values('abcd','102',500);
Output: row inserted
Sql>insert into account values('ganesh','103',3000);
Output: row inserted.
Sql>insert into account values('raju','104',1000);
Output: row inserted
Sql>insert into account values('gani','105',9000);
Output: row inserted.
Program:
declare
acct _bal number(8,2);
acct_no varchar2(15);
debit_amt number(5);
min_bal Number(5);=500;
begin
acct_no:=&acct_no;
debit_amt:=&debit_amt;
select bal into acct_bal from account
where anumber=acct_no;
acct_bal:=acct_bal-debit_amt;
if acct_bal>=min_bal then
update account set bal=bal-debit_
amt where anumber:=acct_no;
else
dbms_output.put_line('insufficient
bal in the output ');
end if;
end;
/
Subscribe to:
Posts (Atom)