SlideShare a Scribd company logo
1 of 17
I.P.
PRACTICAL
FILE
My SQL and
HTML
Made by:
Name: C SAI SATHVICK
ROLL NO: 46
SQLQUERIES
mysql> SELECT *
-> FROM EMP;
+-------+---------+-----------+------+------------+------+------+--------+
| EmpNo | EmpName | Job
| Mgr |Hiredate | Sal | Comm | DeptNo |
+-------+---------+-----------+------+------------+------+------+--------+
| 7369 | SMITH
| CLERK
| 7902 | 17-DEC-80 |
0 | NULL |
NULL |
| 7499 | ALLEN
| SALESMAN | 7698 | 20-FEB-81 | 1600 | 300 |
30 |
| 7521 | WARD
| SALESMAN | 7698 | 22-FEB-81 | 1250 | 500 |
30 |
| 7566 | JONES
| MANAGER
| 7839 | 02-APR-81 | 2975 | NULL |
20 |
| 7654 | MARTIN | SALESMAN | 7698 | 28-SEP-81 | 1250 | 1400 |
30 |
| 7698 | BLAKE
| MANAGER
| 7839 | 01-MAY-81 | 2850 | NULL |
30 |
| 7782 | CLARK
| MANAGER
| 7839 | 09-JUN-81 | 2450 | NULL |
10 |
| 7788 | SCOTT
| ANALYST
| 7566 | 09-DEC-82 | 3000 | NULL |
20 |
| 7839 | KING
| PRESIDENT | NULL | 17-NOV-81 | 5000 | NULL |
10 |
| 7844 | TURNER | SALESMAN | 7698 | 08-SEP-81 | 1500 |
0 |
30 |
| 7876 | ADAMS
| CLERK
| 7788 | 12-JAN-83 | 1100 | NULL |
20 |
| 7900 | JAMES
| CLERK
| 7698 | 03-DEC-81 | 950 | NULL |
30 |
| 7902 | FORD
| ANALYST
| 7566 | 03-DEC-81 | 3000 | NULL |
NULL |
| 7934 | MILLER | CLERK
| 7782 | 23-JAN-82 | 1300 | NULL |
NULL |
+-------+---------+-----------+------+------------+------+------+-------14 rows in set (0.23 sec)

QUERY 1 :
Query to display EmpNo and EmpName of all employees from table EMP.
mysql> SELECT EmpNo, EmpName
-> FROM EMP;
+-------+---------+
| EmpNo | EmpName |
+-------+---------+
| 7369 | SMITH
|
| 7499 | ALLEN
|
| 7521 | WARD
|
| 7566 | JONES
|
| 7654 | MARTIN |
| 7698 | BLAKE
|
| 7782 | CLARK
|
| 7788 | SCOTT
|
| 7839 | KING
|
| 7844 | TURNER |
| 7876 | ADAMS
|
| 7900 | JAMES
|
| 7902 | FORD
|
| 7934 | MILLER |
+-------+---------+
14 rows in set (0.02 sec)

QUERY 2 :
Query to display EmpName, Sal and Sal added with Comm from table EMP.
mysql> SELECT EmpName, Sal, Sal+Comm
-> FROM EMP;
+---------+------+----------+
| EmpName | Sal |Sal+Comm |
+---------+------+----------+
| SMITH
|
0 |
NULL |
| ALLEN
| 1600 |
1900 |
| WARD
| 1250 |
1750 |
| JONES
| 2975 |
NULL |
| MARTIN | 1250 |
2650 |
| BLAKE
| 2850 |
NULL |
| CLARK
| 2450 |
NULL |
| SCOTT
| 3000 |
NULL |
| KING
| 5000 |
NULL |
| TURNER | 1500 |
1500 |
| ADAMS
| 1100 |
NULL |
| JAMES
| 950 |
NULL |
| FORD
| 3000 |
NULL |
| MILLER | 1300 |
NULL |
+---------+------+----------+
14 rows in set (0.03 sec)

QUERY 3 :
Query to display distinct Sal of employees from table EMP.
mysql> SELECT DISTINCT Sal
-> FROM EMP;
+------+
| Sal |
+------+
| 800 |
| 1600 |
| 1250 |
| 2975 |
| 2850 |
| 2450 |
| 3000 |
| 5000 |
| 1500 |
| 1100 |
| 950 |
| 1300 |
+------+ 12 rows in set (0.00 sec)
QUERY 4 :
Query to display EmpName and Sal of Employees whose salary is greater than or
equal to 3000 from table EMP.
mysql> SELECT EmpName, Sal
-> FROM Emp
-> WHERE Sal>=3000;
+-------+---------+-----------+------+------------+------+------+--------+
| EmpNo | EmpName | Job
| Mgr |Hiredate | Sal | Comm | DeptNo |
+-------+---------+-----------+------+------------+------+------+--------+
| 7788 | SCOTT
| ANALYST
| 7566 | 09-DEC-82 | 3000 | NULL |
20 |
| 7839 | KING
| PRESIDENT | NULL | 17-NOV-81 | 5000 | NULL |
10 |
| 7902 | FORD
| ANALYST
| 7566 | 03-DEC-81 | 3000 | NULL |
NULL |
+-------+---------+-----------+------+------------+------+------+------3 rows in set (0.00 sec)

QUERY 5 :
Query to display employee EmpName, Sal and DeptNo who are not getting
commission from table EMP.
mysql> SELECT EmpName, Sal, DeptNo
-> FROM Emp
-> WHERE Comm IS NULL;
+---------+------+--------+
| EmpName | Sal |DeptNo |
+---------+------+--------+
| SMITH
| 800 |
NULL |
| JONES
| 2975 |
20 |
| BLAKE
| 2850 |
30 |
| CLARK
| 2450 |
10 |
| SCOTT
| 3000 |
20 |
| KING
| 5000 |
10 |
| ADAMS
| 1100 |
20 |
| JAMES
| 950 |
30 |
| FORD
| 3000 |
NULL |
| MILLER | 1300 |
NULL |
+---------+------+--------+ 10 rows in set (0.00 sec)

QUERY 6 :
Query to display employee Number, name, sal and sal*12 as Annual Salary whose
commission is not NULL from table Emp.
mysql> SELECT EmpNO, EmpName, Sal, Sal*12 "Annual Salary"
-> FROM EMP
-> WHERE Comm IS NOT NULL;
+-------+---------+------+---------------+
| EmpNO | EmpName | Sal | Annual Salary |
+-------+---------+------+---------------+
| 7499 | ALLEN
| 1600 |
19200 |
| 7521 | WARD
| 1250 |
15000 |
| 7654 | MARTIN | 1250 |
15000 |
| 7844 | TURNER | 1500 |
18000 |
+-------+---------+------+---------------+
4 rows in set (0.00 sec)

QUERY 7 :
Query to display employee name and salary of those employee who don’t have
their salary in the range of 1500 to 2000
mysql> SELECT EmpName, Sal
-> FROM EMP
-> WHERE Sal NOT BETWEEN 1500 AND 2000;
+---------+------+
| EmpName | Sal |
+---------+------+
| SMITH
| 800 |
| WARD
| 1250 |
| JONES
| 2975 |
| MARTIN | 1250 |
| BLAKE
| 2850 |
| CLARK
| 2450 |
| SCOTT
| 3000 |
| KING
| 5000 |
| ADAMS
| 1100 |
| JAMES
| 950 |
| FORD
| 3000 |
| MILLER | 1300 |
+---------+------+
12 rows in set (0.00 sec)

QUERY 8 :
Query to display name, job, salary, and HireDate of employees who are
hired between February 20, 1981, and May 1, 1981. Order the query in
ascending order of HireDate.
mysql> SELECT EmpName, Job, Sal, Hiredate
-> WHERE Hiredate BETWEEN '20-Feb-81' AND '01-May-81'
-> ORDER BY Hiredate;
+---------+-----------+------+------------+
| EmpName | Job
| Sal |Hiredate |
+---------+-----------+------+------------+
| ALLEN
| SALESMAN | 1600 | 20-FEB-81 |
| WARD
| SALESMAN | 1250 | 22-FEB-81 |
| JONES
| MANAGER
| 2975 | 02-APR-81 |
| BLAKE
| MANAGER
| 2850 | 01-MAY-81 |
+---------+-----------+------+------------+
14 rows in set (0.00 sec)
QUERY 9 :
Query to display the name, job title and salary of employee who are not
Manager.
mysql> SELECT EmpName, Job, Sal
-> FROM EMP
-> WHERE JOB NOT IN("MANAGER");
+---------+-----------+------+
| EmpName | Job
| Sal |
+---------+-----------+------+
| SMITH
| CLERK
| 800 |
| ALLEN
| SALESMAN | 1600 |
| WARD
| SALESMAN | 1250 |
| MARTIN | SALESMAN | 1250 |
| SCOTT
| ANALYST
| 3000 |
| KING
| PRESIDENT | 5000 |
| TURNER | SALESMAN | 1500 |
| ADAMS
| CLERK
| 1100 |
| JAMES
| CLERK
| 950 |
| FORD
| ANALYST
| 3000 |
| MILLER | CLERK
| 1300 |
+---------+-----------+------+
11 rows in set (0.00 sec)

QUERY 10 :
Query to display the name of employee whose name contains æAÆ as third
alphabet.
mysql> SELECT EmpName
-> FROM EMP
-> WHERE EmpName LIKE "__A%";
+---------+
| EmpName |
+---------+
| BLAKE
|
| CLARK
|
| ADAMS
|
+---------+
3 rows in set (0.01 sec)

QUERY 11 :
Query to display the name of employee whose name contains æTÆ as the last
alphabet.
mysql> SELECT EmpName
-> FROM EMP
-> WHERE EmpName LIKE "%T";
+---------+
| EmpName |
+---------+
| SCOTT
|
+---------+
1 row in set (0.00 sec)

QUERY 12 :
Query to display the name of employee whose name contains æMÆ as first
alphabet &æLÆ as third alphabet.
mysql> SELECT EmpName
-> FROM EMP
-> WHERE EmpName LIKE "M_L%";
+---------+
| EmpName |
+---------+
| MILLER |
+---------+
1 row in set (0.02 sec)

QUERY 13 :
Query to display the name of employee who is having æLÆ as any alphabet of
the name.
mysql> SELECT EmpName
-> FROM EMP
-> WHERE EmpName LIKE "%L%";
+---------+
| EmpName |
+---------+
| ALLEN
|
| BLAKE
|
| CLARK
|
| MILLER |
+---------+
4 rows in set (0.00 sec)

QUERY 14 :
Query to display the current system date.
mysql> SELECT sysdate() FROM dual;
+-------------+
| SYSDATE() |
+-------------+
| 03-Nov-11
|
+-------------+
1 row in set (0.01 sec)

QUERY 15 :
Query to display employee number, name, salary, salary increase by 15%.
Label the column as New Salary.
mysql> SELECT EmpNo, EmpName, Sal, Sal*.15 "New Salary"
-> FROM EMP;
+-------+---------+------+------------+
| EmpNo | EmpName | Sal | New Salary |
+-------+---------+------+------------+
| 7369 | SMITH
| 800 |
920.00 |
| 7499 | ALLEN
| 1600 |
1840.00 |
| 7521 | WARD
| 1250 |
1437.50 |
| 7566 | JONES
| 2975 |
3421.25 |
| 7654 | MARTIN | 1250 |
1437.50 |
| 7698 | BLAKE
| 2850 |
3277.50 |
| 7782 | CLARK
| 2450 |
2817.50 |
| 7788 | SCOTT
| 3000 |
3450.00 |
| 7839 | KING
| 5000 |
5750.00 |
| 7844 | TURNER | 1500 |
1725.00 |
| 7876 | ADAMS
| 1100 |
1265.00 |
| 7900 | JAMES
| 950 |
1092.50 |
| 7902 | FORD
| 3000 |
3450.00 |
| 7934 | MILLER | 1300 |
1495.00 |
+-------+---------+------+------------+
14 rows in set (0.05 sec)

QUERY 16 :
Query that produces display in the following format
<employee name> Earns $<salary> Monthly and working as <Job >
mysql> SELECT EmpName, 'earns $', Sal, 'Monthly and working as', Job
-> FROM EMP;
+---------+---------+------+------------------------+-----------+
| EmpName | earns $ | Sal | monthly and working as | Job
|
+---------+---------+------+------------------------+-----------+
| SMITH
| earns $ | 800 | monthly and working as | CLERK
|
| ALLEN
| earns $ | 1600 | monthly and working as | SALESMAN |
| WARD
| earns $ | 1250 | monthly and working as | SALESMAN |
| JONES
| earns $ | 2975 | monthly and working as | MANAGER
|
| MARTIN | earns $ | 1250 | monthly and working as | SALESMAN |
| BLAKE
| earns $ | 2850 | monthly and working as | MANAGER
|
| CLARK
| earns $ | 2450 | monthly and working as | MANAGER
|
| SCOTT
| earns $ | 3000 | monthly and working as | ANALYST
|
| KING
| earns $ | 5000 | monthly and working as | PRESIDENT |
| TURNER | earns $ | 1500 | monthly and working as | SALESMAN |
| ADAMS
| earns $ | 1100 | monthly and working as | CLERK
|
| JAMES
| earns $ | 950 | monthly and working as | CLERK
|
| FORD
| earns $ | 3000 | monthly and working as | ANALYST
|
| MILLER | earns $ | 1300 | monthly and working as | CLERK
|
+---------+---------+------+------------------------+-----------+
14 rows in set (0.00 sec)

HTML PROGRAMS
HTML PROGRAM 1:
<HTML>
<BODY>
<P ALIGN=CENTER>
<CENTER.<H1>PLEASE ENTER YOUR DETAILS</H1></CENTER>
</P>
<FORM METHOD=POST>
<P>Person's Name:
<INPUT TYPE="text" NAME="persons-name" SIZE="40" MAXLENGTH="40">
<INPUT TYPE="hidden" NAME="recipient" SIZE="40" MAXLENGTH="40">
</P>
<P>Password:
<INPUT TYPE="password" NAME="password" SIZE="10" MAXLENGTH="40">
</P>
<P>Please Place me on your mailing list :
<INPUT TYPE="checkbox" NAME="mailing-list" VALUE="Yes" checked>
</P>
<P>What Country do you Live in ?
<SELCT Name="Country">
<OPTION VALUE="IND">India
<OPTION VALUE="USA">United States
<OPTION VALUE="CA">Canada
<OPTION VALUE="FR">France
<OPTION VALUE="SPR">Singapore
</SELECT>
</P>
<P>Type of Computer you have :
<INPUT TYPE="radio" NAME="Comp-Typ" VALUE="486DX">486 DX &nbsp;
<INPUT TYPE="radio" NAME="Comp-Typ" VALUE="486SX">486 SX &nbsp;
<INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium2">Pentium II &nbsp;
<INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium3">Pentium III &nbsp;
<INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium4">Pentium IV &nbsp;
</P>
<P>Comments :
<TEXTAREA NAME="comments" ROWS="5" COLS="25"></TEXTAREA>
</P>
<P>
<INPUT TYPE="submit" NAME="Request" VALUE="Submit This Form">
<INPUT TYPE="reset" NAME="Clear" VALUE="Clear Form and Start Over">
</P>
</FORM>
</BODY>
</HTML>

HTML PROGRAM 2:
<html>
<body>
<h4>An Ordered List:</h4>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol type=A>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<h4>An Unordered List:</h4>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ul type=circle>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>

HTML PROGRAM 3:

<html>
<body>
<dl>
<dt>DRDO
<dd>The Defence Research and Development Organisation is an agency of the
Republic of India, responsible for the development of technology for use by the
military, headquartered in New Delhi, India. It was formed in 1958 by the
merger of the Technical Development Establishment and the Directorate of
Technical Development and Production with the Defence Science Organisation.
</dl>
</body>
</html>

HTML PROGRAM 4:
<html>
<body>
<table border="1">
<theadbgcolor="pink">
<tr>
<td>Header r11</td>
<td>Header r12</td>
</tr>
<tr>
<td>header r21</td>
<td>Header r22</td>
</tr>
</thead>
<tbodybgcolor="yellow">
<tr>
<td>body cell data1</td>
<td>Body cell data2</td>
</tr>
<tr>
<td>Body cell data3</td>
<td>Body cell data4</td>
</tr>
<tr>
<td>Body Cell data5</td>
<td>Body cell data6</td>
</tr>
</tbody>
<tfoot align=center bgcolor=cyan>
<tr>
<td>Footer data</td>
<td>Footer data</td>
</tr>
</tfoot>
</body>
</html>

HTML PROGRAM 5:

<html>
<body>
<a href="http://www.google.com">Visit Google</a><br>
<a href="http://www.facebook.com">Visit Facebook</a><br>
<a href="http://www.yahoo.com">Visit Yahoo</a>
</body>
</html>
HTML PROGRAM 6:

<html>
<head>
<title>
xii-ip-2-basic html tag HTML-I </title>
</head>
<body leftmargin="60" topmargin=90 background = H:KVSlogo.jpg >
<H1> LEVEL 1 HEADING TAG BY DEFAULT LEFT ALIGN </H1>
<H2 ALIGN = CENTER> LEVEL 2 HEADING </H2>
<H3 ALIGN = RIGHT > LEVEL 3 HEADING </H3>
<H4 ALIGN = LEFT > LEVEL 4 HEADING </H4>
<H5> LEVEL 5 HEADING </H5>
<H6> LEVEL 6 HEADING </H6>
HELLO STUDENT! WE ALL WISH A VERY BEST OF LUCK FOR YOUR EXAM. AND
BELIEVE THAT U ALL WILL SHOW YOUR BEST. WE PRAY TO GOD TO GIVE YOUR BEST LUCK
IN THIS EXAM. </P>
<P> Notepad is a basic text editor that you can use to create
simple documents. The most common use for Notepad is to view or edit text
(.txt) files, but many users find Notepad a simple tool for creating Web
pages.</P>
<P ALIGN = RIGHT>Because Notepad supports only very basic
formatting, you cannot accidentally save special formatting in documents that
need to remain pure text. This is especially useful when creating HTML
documents for a Web page because special characters or other formatting may
not appear in your published Web page or may even cause errors.</P>
<P ALIGN = CENTER>You can save your Notepad files as Unicode,
ANSI, UTF-8, or big-endian Unicode. These formats provide you greater
flexibility when working with documents that use different character sets.
</P>
<P ALIGN = LEFT>Notepad allows you to create and open documents in several
different formats: ANSI, Unicode, big-endian Unicode, or UTF-8. These formats
allow you to work with documents that use different character sets.</P>
<BASEFONT SIZE=2> THIS IS
A BOOK 2<BR>
<BASEFONT SIZE=3> THIS IS
A BOOK 3<BR>
<BASEFONT SIZE=4> THIS IS
A BOOK 4<BR>
<BASEFONT SIZE=5> THIS IS
A BOOK 5<BR>
<BASEFONT SIZE=6> THIS IS
A BOOK 6<BR>
<BASEFONT SIZE=7> THIS IS
<BASEFONT SIZE=8> THIS IS
<BASEFONT SIZE=-2> THIS IS

A BOOK 7<BR>
A BOOK 8<BR>
A BOOK 6<BR>

'<FONT> HELLO </FONT>
<FONT SIZE = 1 COLOR = BLUE > HELLO 1 </FONT>
<FONT SIZE = 1 COLOR = #0000FF > HELLO 1 </FONT>
<FONT SIZE = 2 COLOR = RED > HELLO 2 </FONT>
<FONT SIZE = 2 COLOR = #FF0000 > HELLO 2 </FONT>
<FONT SIZE = 3 COLOR = GREEN> HELLO 3 </FONT>
<FONT SIZE = 3 COLOR = #008000> HELLO 3 </FONT>
<FONT SIZE = 4 COLOR = TEAL > HELLO 4 </FONT>
<FONT SIZE = 4 COLOR = TEAL > HELLO 4 </FONT>
<FONT SIZE = 5 COLOR = AQUA > HELLO 5 </FONT>
<FONT SIZE = 5 COLOR = #00FFFF > HELLO 5 </FONT><BR>
<FONT SIZE = 6 COLOR = LIME > HELLO 6 </FONT>
<FONT SIZE = 6 COLOR = #00FF00 > HELLO 6 </FONT>
<FONT SIZE = 7 COLOR = MAROON> HELLO 7 </FONT>
<FONT SIZE = 7 COLOR = #800000> HELLO 7 </FONT>
<FONT SIZE = 8 COLOR =OLIVE > HELLO 8 </FONT>
<FONT SIZE = 8 COLOR =#808000 > HELLO 8 </FONT>
<FONT SIZE = 3 COLOR = PURPLE> HELLO 3 </FONT>
<FONT SIZE = 3 COLOR =#800080> HELLO 3 </FONT>
<FONT SIZE = +2 COLOR = SILVER> HELLO 5 </FONT>
<FONT SIZE = +2 COLOR = C0C0C0> HELLO 5 </FONT>
<FONT COLOR = YELLOW> HELLO
</FONT>
<FONT COLOR = FFFF00> HELLO
</FONT>
<FONT COLOR = GREY> HELLO </FONT>
<FONT COLOR = 808080> HELLO </FONT>
<FONT FACE = "Verdana"> VERDANA </FONT>
<FONT FACE = "Comic Sans MS"> Comic Sans MS </FONT>
<FONT FACE = "Arial Black"> Arial Black </FONT><BR>
<FONT FACE = "Arial Black, Verdana"> VERDANA </FONT>
<FONT FACE = "BRH Devanagari, Verdana, Arial Black"> VERDANA </FONT>
<HR> ONE
<HR SIZE=1> ONE SIZE MEANS THICKNESS
<HR SIZE=2> TWO
<HR SIZE=12> ABOVE IS 12
<HR SIZE=36> ABOVE IS 36
<HR SIZE=72> ABOVE IS 72
<HR SIZE=100> ABOVE IS 100
<HR SIZE=2 WIDTH =25> ABOVE 25
<HR SIZE=2 WIDTH =50> ABOVE 50
<HR SIZE=2 WIDTH =50%> ABOVE 50%
<HR SIZE=2 WIDTH =70> ABOVE 70
<HR SIZE=2 WIDTH =100> ABOVE 100
<HR SIZE=2 WIDTH =100%> ABOVE 100%
<HR SIZE = 12> ABOVE IS 3-D RULE
<HR NOSHADE SIZE = 12> ABOVE IS 2-D RULE
<!--- THIS IS A SINGLE LINE COMMENT PART --->
<!--- THIS IS MULTIPLE LINES COMMENT PART
HELLO STUDENTS
WE ARE STUDING HTML--->
</body>
</html>

More Related Content

Similar to My SQL and HTML Practical File

database application using SQL DML statements: Insert, Select, Update, Delet...
 database application using SQL DML statements: Insert, Select, Update, Delet... database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...bhavesh lande
 
database application using SQL DML statements: all types of Join, Sub-Query ...
 database application using SQL DML statements: all types of Join, Sub-Query ... database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: all types of Join, Sub-Query ...bhavesh lande
 
Sangam 19 - Analytic SQL
Sangam 19 - Analytic SQLSangam 19 - Analytic SQL
Sangam 19 - Analytic SQLConnor McDonald
 
Analytics functions in mysql, oracle and hive
Analytics functions in mysql, oracle and hiveAnalytics functions in mysql, oracle and hive
Analytics functions in mysql, oracle and hiveAnkit Beohar
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQLJussi Pohjolainen
 
Assignment 2 (16-08-2013)
Assignment 2 (16-08-2013)Assignment 2 (16-08-2013)
Assignment 2 (16-08-2013)Sanjay Pathak
 
Optimizing Queries Using Window Functions
Optimizing Queries Using Window FunctionsOptimizing Queries Using Window Functions
Optimizing Queries Using Window FunctionsI Goo Lee
 
ILOUG 2019 - SQL features for Developers
ILOUG 2019 - SQL features for DevelopersILOUG 2019 - SQL features for Developers
ILOUG 2019 - SQL features for DevelopersConnor McDonald
 
4. Data Manipulation.ppt
4. Data Manipulation.ppt4. Data Manipulation.ppt
4. Data Manipulation.pptKISHOYIANKISH
 
Mysqlfunctions
MysqlfunctionsMysqlfunctions
MysqlfunctionsN13M
 
80 different SQL Queries with output
80 different SQL Queries with output80 different SQL Queries with output
80 different SQL Queries with outputNexus
 
SQL WORKSHOP::Lecture 12
SQL WORKSHOP::Lecture 12SQL WORKSHOP::Lecture 12
SQL WORKSHOP::Lecture 12Umair Amjad
 
Cat database
Cat databaseCat database
Cat databasetubbeles
 

Similar to My SQL and HTML Practical File (20)

database application using SQL DML statements: Insert, Select, Update, Delet...
 database application using SQL DML statements: Insert, Select, Update, Delet... database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
 
database application using SQL DML statements: all types of Join, Sub-Query ...
 database application using SQL DML statements: all types of Join, Sub-Query ... database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: all types of Join, Sub-Query ...
 
Empresa completo
Empresa completoEmpresa completo
Empresa completo
 
Analytic SQL Sep 2013
Analytic SQL Sep 2013Analytic SQL Sep 2013
Analytic SQL Sep 2013
 
Sangam 19 - Analytic SQL
Sangam 19 - Analytic SQLSangam 19 - Analytic SQL
Sangam 19 - Analytic SQL
 
Analytics functions in mysql, oracle and hive
Analytics functions in mysql, oracle and hiveAnalytics functions in mysql, oracle and hive
Analytics functions in mysql, oracle and hive
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQL
 
Assignment 2 (16-08-2013)
Assignment 2 (16-08-2013)Assignment 2 (16-08-2013)
Assignment 2 (16-08-2013)
 
Optimizing Queries Using Window Functions
Optimizing Queries Using Window FunctionsOptimizing Queries Using Window Functions
Optimizing Queries Using Window Functions
 
100 sql queries
100 sql queries100 sql queries
100 sql queries
 
Intro to my sql
Intro to my sqlIntro to my sql
Intro to my sql
 
Explain
ExplainExplain
Explain
 
ILOUG 2019 - SQL features for Developers
ILOUG 2019 - SQL features for DevelopersILOUG 2019 - SQL features for Developers
ILOUG 2019 - SQL features for Developers
 
4. Data Manipulation.ppt
4. Data Manipulation.ppt4. Data Manipulation.ppt
4. Data Manipulation.ppt
 
Mysqlfunctions
MysqlfunctionsMysqlfunctions
Mysqlfunctions
 
80 different SQL Queries with output
80 different SQL Queries with output80 different SQL Queries with output
80 different SQL Queries with output
 
SQL WORKSHOP::Lecture 12
SQL WORKSHOP::Lecture 12SQL WORKSHOP::Lecture 12
SQL WORKSHOP::Lecture 12
 
Les02
Les02Les02
Les02
 
Les02 Restricting And Sorting Data
Les02 Restricting And Sorting DataLes02 Restricting And Sorting Data
Les02 Restricting And Sorting Data
 
Cat database
Cat databaseCat database
Cat database
 

More from Sai Sathvick Chirakala

More from Sai Sathvick Chirakala (10)

Characteristics of healthy personality
Characteristics of healthy personalityCharacteristics of healthy personality
Characteristics of healthy personality
 
My Sql
My Sql My Sql
My Sql
 
informatics practices practical file
informatics practices practical fileinformatics practices practical file
informatics practices practical file
 
content of cold drinks available in the market-chemistry investigatory project
content of cold drinks available in the market-chemistry investigatory projectcontent of cold drinks available in the market-chemistry investigatory project
content of cold drinks available in the market-chemistry investigatory project
 
Physics project class 12 EMI
Physics project class 12 EMIPhysics project class 12 EMI
Physics project class 12 EMI
 
02 chapter 11 thermodynamics
02 chapter 11 thermodynamics02 chapter 11 thermodynamics
02 chapter 11 thermodynamics
 
Chapter 11 equilibrium lecture notes
Chapter 11 equilibrium lecture notesChapter 11 equilibrium lecture notes
Chapter 11 equilibrium lecture notes
 
Class ion exchange 22 oct 08
Class ion exchange 22 oct 08Class ion exchange 22 oct 08
Class ion exchange 22 oct 08
 
The frog and the nightingle
The frog and the nightingleThe frog and the nightingle
The frog and the nightingle
 
Congruence of triangle
Congruence of triangleCongruence of triangle
Congruence of triangle
 

Recently uploaded

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 

My SQL and HTML Practical File

  • 1. I.P. PRACTICAL FILE My SQL and HTML Made by: Name: C SAI SATHVICK ROLL NO: 46
  • 2. SQLQUERIES mysql> SELECT * -> FROM EMP; +-------+---------+-----------+------+------------+------+------+--------+ | EmpNo | EmpName | Job | Mgr |Hiredate | Sal | Comm | DeptNo | +-------+---------+-----------+------+------------+------+------+--------+ | 7369 | SMITH | CLERK | 7902 | 17-DEC-80 | 0 | NULL | NULL | | 7499 | ALLEN | SALESMAN | 7698 | 20-FEB-81 | 1600 | 300 | 30 | | 7521 | WARD | SALESMAN | 7698 | 22-FEB-81 | 1250 | 500 | 30 | | 7566 | JONES | MANAGER | 7839 | 02-APR-81 | 2975 | NULL | 20 | | 7654 | MARTIN | SALESMAN | 7698 | 28-SEP-81 | 1250 | 1400 | 30 | | 7698 | BLAKE | MANAGER | 7839 | 01-MAY-81 | 2850 | NULL | 30 | | 7782 | CLARK | MANAGER | 7839 | 09-JUN-81 | 2450 | NULL | 10 | | 7788 | SCOTT | ANALYST | 7566 | 09-DEC-82 | 3000 | NULL | 20 | | 7839 | KING | PRESIDENT | NULL | 17-NOV-81 | 5000 | NULL | 10 | | 7844 | TURNER | SALESMAN | 7698 | 08-SEP-81 | 1500 | 0 | 30 | | 7876 | ADAMS | CLERK | 7788 | 12-JAN-83 | 1100 | NULL | 20 | | 7900 | JAMES | CLERK | 7698 | 03-DEC-81 | 950 | NULL | 30 | | 7902 | FORD | ANALYST | 7566 | 03-DEC-81 | 3000 | NULL | NULL | | 7934 | MILLER | CLERK | 7782 | 23-JAN-82 | 1300 | NULL | NULL | +-------+---------+-----------+------+------------+------+------+-------14 rows in set (0.23 sec) QUERY 1 : Query to display EmpNo and EmpName of all employees from table EMP. mysql> SELECT EmpNo, EmpName -> FROM EMP; +-------+---------+ | EmpNo | EmpName | +-------+---------+ | 7369 | SMITH | | 7499 | ALLEN | | 7521 | WARD | | 7566 | JONES | | 7654 | MARTIN | | 7698 | BLAKE | | 7782 | CLARK | | 7788 | SCOTT | | 7839 | KING | | 7844 | TURNER | | 7876 | ADAMS | | 7900 | JAMES | | 7902 | FORD | | 7934 | MILLER | +-------+---------+
  • 3. 14 rows in set (0.02 sec) QUERY 2 : Query to display EmpName, Sal and Sal added with Comm from table EMP. mysql> SELECT EmpName, Sal, Sal+Comm -> FROM EMP; +---------+------+----------+ | EmpName | Sal |Sal+Comm | +---------+------+----------+ | SMITH | 0 | NULL | | ALLEN | 1600 | 1900 | | WARD | 1250 | 1750 | | JONES | 2975 | NULL | | MARTIN | 1250 | 2650 | | BLAKE | 2850 | NULL | | CLARK | 2450 | NULL | | SCOTT | 3000 | NULL | | KING | 5000 | NULL | | TURNER | 1500 | 1500 | | ADAMS | 1100 | NULL | | JAMES | 950 | NULL | | FORD | 3000 | NULL | | MILLER | 1300 | NULL | +---------+------+----------+ 14 rows in set (0.03 sec) QUERY 3 : Query to display distinct Sal of employees from table EMP. mysql> SELECT DISTINCT Sal -> FROM EMP; +------+ | Sal | +------+ | 800 | | 1600 | | 1250 | | 2975 | | 2850 | | 2450 | | 3000 | | 5000 | | 1500 | | 1100 | | 950 | | 1300 | +------+ 12 rows in set (0.00 sec)
  • 4. QUERY 4 : Query to display EmpName and Sal of Employees whose salary is greater than or equal to 3000 from table EMP. mysql> SELECT EmpName, Sal -> FROM Emp -> WHERE Sal>=3000; +-------+---------+-----------+------+------------+------+------+--------+ | EmpNo | EmpName | Job | Mgr |Hiredate | Sal | Comm | DeptNo | +-------+---------+-----------+------+------------+------+------+--------+ | 7788 | SCOTT | ANALYST | 7566 | 09-DEC-82 | 3000 | NULL | 20 | | 7839 | KING | PRESIDENT | NULL | 17-NOV-81 | 5000 | NULL | 10 | | 7902 | FORD | ANALYST | 7566 | 03-DEC-81 | 3000 | NULL | NULL | +-------+---------+-----------+------+------------+------+------+------3 rows in set (0.00 sec) QUERY 5 : Query to display employee EmpName, Sal and DeptNo who are not getting commission from table EMP. mysql> SELECT EmpName, Sal, DeptNo -> FROM Emp -> WHERE Comm IS NULL; +---------+------+--------+ | EmpName | Sal |DeptNo | +---------+------+--------+ | SMITH | 800 | NULL | | JONES | 2975 | 20 | | BLAKE | 2850 | 30 | | CLARK | 2450 | 10 | | SCOTT | 3000 | 20 | | KING | 5000 | 10 | | ADAMS | 1100 | 20 | | JAMES | 950 | 30 | | FORD | 3000 | NULL | | MILLER | 1300 | NULL | +---------+------+--------+ 10 rows in set (0.00 sec) QUERY 6 : Query to display employee Number, name, sal and sal*12 as Annual Salary whose commission is not NULL from table Emp. mysql> SELECT EmpNO, EmpName, Sal, Sal*12 "Annual Salary" -> FROM EMP -> WHERE Comm IS NOT NULL; +-------+---------+------+---------------+ | EmpNO | EmpName | Sal | Annual Salary | +-------+---------+------+---------------+ | 7499 | ALLEN | 1600 | 19200 | | 7521 | WARD | 1250 | 15000 | | 7654 | MARTIN | 1250 | 15000 | | 7844 | TURNER | 1500 | 18000 | +-------+---------+------+---------------+
  • 5. 4 rows in set (0.00 sec) QUERY 7 : Query to display employee name and salary of those employee who don’t have their salary in the range of 1500 to 2000 mysql> SELECT EmpName, Sal -> FROM EMP -> WHERE Sal NOT BETWEEN 1500 AND 2000; +---------+------+ | EmpName | Sal | +---------+------+ | SMITH | 800 | | WARD | 1250 | | JONES | 2975 | | MARTIN | 1250 | | BLAKE | 2850 | | CLARK | 2450 | | SCOTT | 3000 | | KING | 5000 | | ADAMS | 1100 | | JAMES | 950 | | FORD | 3000 | | MILLER | 1300 | +---------+------+ 12 rows in set (0.00 sec) QUERY 8 : Query to display name, job, salary, and HireDate of employees who are hired between February 20, 1981, and May 1, 1981. Order the query in ascending order of HireDate. mysql> SELECT EmpName, Job, Sal, Hiredate -> WHERE Hiredate BETWEEN '20-Feb-81' AND '01-May-81' -> ORDER BY Hiredate; +---------+-----------+------+------------+ | EmpName | Job | Sal |Hiredate | +---------+-----------+------+------------+ | ALLEN | SALESMAN | 1600 | 20-FEB-81 | | WARD | SALESMAN | 1250 | 22-FEB-81 | | JONES | MANAGER | 2975 | 02-APR-81 | | BLAKE | MANAGER | 2850 | 01-MAY-81 | +---------+-----------+------+------------+ 14 rows in set (0.00 sec)
  • 6. QUERY 9 : Query to display the name, job title and salary of employee who are not Manager. mysql> SELECT EmpName, Job, Sal -> FROM EMP -> WHERE JOB NOT IN("MANAGER"); +---------+-----------+------+ | EmpName | Job | Sal | +---------+-----------+------+ | SMITH | CLERK | 800 | | ALLEN | SALESMAN | 1600 | | WARD | SALESMAN | 1250 | | MARTIN | SALESMAN | 1250 | | SCOTT | ANALYST | 3000 | | KING | PRESIDENT | 5000 | | TURNER | SALESMAN | 1500 | | ADAMS | CLERK | 1100 | | JAMES | CLERK | 950 | | FORD | ANALYST | 3000 | | MILLER | CLERK | 1300 | +---------+-----------+------+ 11 rows in set (0.00 sec) QUERY 10 : Query to display the name of employee whose name contains æAÆ as third alphabet. mysql> SELECT EmpName -> FROM EMP -> WHERE EmpName LIKE "__A%"; +---------+ | EmpName | +---------+ | BLAKE | | CLARK | | ADAMS | +---------+ 3 rows in set (0.01 sec) QUERY 11 :
  • 7. Query to display the name of employee whose name contains æTÆ as the last alphabet. mysql> SELECT EmpName -> FROM EMP -> WHERE EmpName LIKE "%T"; +---------+ | EmpName | +---------+ | SCOTT | +---------+ 1 row in set (0.00 sec) QUERY 12 : Query to display the name of employee whose name contains æMÆ as first alphabet &æLÆ as third alphabet. mysql> SELECT EmpName -> FROM EMP -> WHERE EmpName LIKE "M_L%"; +---------+ | EmpName | +---------+ | MILLER | +---------+ 1 row in set (0.02 sec) QUERY 13 : Query to display the name of employee who is having æLÆ as any alphabet of the name. mysql> SELECT EmpName -> FROM EMP -> WHERE EmpName LIKE "%L%"; +---------+ | EmpName | +---------+ | ALLEN | | BLAKE | | CLARK | | MILLER | +---------+ 4 rows in set (0.00 sec) QUERY 14 : Query to display the current system date.
  • 8. mysql> SELECT sysdate() FROM dual; +-------------+ | SYSDATE() | +-------------+ | 03-Nov-11 | +-------------+ 1 row in set (0.01 sec) QUERY 15 : Query to display employee number, name, salary, salary increase by 15%. Label the column as New Salary. mysql> SELECT EmpNo, EmpName, Sal, Sal*.15 "New Salary" -> FROM EMP; +-------+---------+------+------------+ | EmpNo | EmpName | Sal | New Salary | +-------+---------+------+------------+ | 7369 | SMITH | 800 | 920.00 | | 7499 | ALLEN | 1600 | 1840.00 | | 7521 | WARD | 1250 | 1437.50 | | 7566 | JONES | 2975 | 3421.25 | | 7654 | MARTIN | 1250 | 1437.50 | | 7698 | BLAKE | 2850 | 3277.50 | | 7782 | CLARK | 2450 | 2817.50 | | 7788 | SCOTT | 3000 | 3450.00 | | 7839 | KING | 5000 | 5750.00 | | 7844 | TURNER | 1500 | 1725.00 | | 7876 | ADAMS | 1100 | 1265.00 | | 7900 | JAMES | 950 | 1092.50 | | 7902 | FORD | 3000 | 3450.00 | | 7934 | MILLER | 1300 | 1495.00 | +-------+---------+------+------------+ 14 rows in set (0.05 sec) QUERY 16 : Query that produces display in the following format <employee name> Earns $<salary> Monthly and working as <Job >
  • 9. mysql> SELECT EmpName, 'earns $', Sal, 'Monthly and working as', Job -> FROM EMP; +---------+---------+------+------------------------+-----------+ | EmpName | earns $ | Sal | monthly and working as | Job | +---------+---------+------+------------------------+-----------+ | SMITH | earns $ | 800 | monthly and working as | CLERK | | ALLEN | earns $ | 1600 | monthly and working as | SALESMAN | | WARD | earns $ | 1250 | monthly and working as | SALESMAN | | JONES | earns $ | 2975 | monthly and working as | MANAGER | | MARTIN | earns $ | 1250 | monthly and working as | SALESMAN | | BLAKE | earns $ | 2850 | monthly and working as | MANAGER | | CLARK | earns $ | 2450 | monthly and working as | MANAGER | | SCOTT | earns $ | 3000 | monthly and working as | ANALYST | | KING | earns $ | 5000 | monthly and working as | PRESIDENT | | TURNER | earns $ | 1500 | monthly and working as | SALESMAN | | ADAMS | earns $ | 1100 | monthly and working as | CLERK | | JAMES | earns $ | 950 | monthly and working as | CLERK | | FORD | earns $ | 3000 | monthly and working as | ANALYST | | MILLER | earns $ | 1300 | monthly and working as | CLERK | +---------+---------+------+------------------------+-----------+ 14 rows in set (0.00 sec) HTML PROGRAMS HTML PROGRAM 1:
  • 10. <HTML> <BODY> <P ALIGN=CENTER> <CENTER.<H1>PLEASE ENTER YOUR DETAILS</H1></CENTER> </P> <FORM METHOD=POST> <P>Person's Name: <INPUT TYPE="text" NAME="persons-name" SIZE="40" MAXLENGTH="40"> <INPUT TYPE="hidden" NAME="recipient" SIZE="40" MAXLENGTH="40"> </P> <P>Password: <INPUT TYPE="password" NAME="password" SIZE="10" MAXLENGTH="40"> </P> <P>Please Place me on your mailing list : <INPUT TYPE="checkbox" NAME="mailing-list" VALUE="Yes" checked> </P> <P>What Country do you Live in ? <SELCT Name="Country"> <OPTION VALUE="IND">India <OPTION VALUE="USA">United States <OPTION VALUE="CA">Canada <OPTION VALUE="FR">France
  • 11. <OPTION VALUE="SPR">Singapore </SELECT> </P> <P>Type of Computer you have : <INPUT TYPE="radio" NAME="Comp-Typ" VALUE="486DX">486 DX &nbsp; <INPUT TYPE="radio" NAME="Comp-Typ" VALUE="486SX">486 SX &nbsp; <INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium2">Pentium II &nbsp; <INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium3">Pentium III &nbsp; <INPUT TYPE="radio" NAME="Comp-Typ" VALUE="Pentium4">Pentium IV &nbsp; </P> <P>Comments : <TEXTAREA NAME="comments" ROWS="5" COLS="25"></TEXTAREA> </P> <P> <INPUT TYPE="submit" NAME="Request" VALUE="Submit This Form"> <INPUT TYPE="reset" NAME="Clear" VALUE="Clear Form and Start Over"> </P> </FORM> </BODY> </HTML> HTML PROGRAM 2:
  • 12. <html> <body> <h4>An Ordered List:</h4> <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <ol type=A> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <h4>An Unordered List:</h4> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> <ul type=circle> <li>Coffee</li>
  • 13. <li>Tea</li> <li>Milk</li> </ul> </body> </html> HTML PROGRAM 3: <html> <body> <dl> <dt>DRDO <dd>The Defence Research and Development Organisation is an agency of the Republic of India, responsible for the development of technology for use by the military, headquartered in New Delhi, India. It was formed in 1958 by the merger of the Technical Development Establishment and the Directorate of Technical Development and Production with the Defence Science Organisation. </dl> </body> </html> HTML PROGRAM 4:
  • 14. <html> <body> <table border="1"> <theadbgcolor="pink"> <tr> <td>Header r11</td> <td>Header r12</td> </tr> <tr> <td>header r21</td> <td>Header r22</td> </tr> </thead> <tbodybgcolor="yellow"> <tr> <td>body cell data1</td> <td>Body cell data2</td> </tr> <tr> <td>Body cell data3</td>
  • 15. <td>Body cell data4</td> </tr> <tr> <td>Body Cell data5</td> <td>Body cell data6</td> </tr> </tbody> <tfoot align=center bgcolor=cyan> <tr> <td>Footer data</td> <td>Footer data</td> </tr> </tfoot> </body> </html> HTML PROGRAM 5: <html> <body> <a href="http://www.google.com">Visit Google</a><br> <a href="http://www.facebook.com">Visit Facebook</a><br> <a href="http://www.yahoo.com">Visit Yahoo</a> </body> </html>
  • 16. HTML PROGRAM 6: <html> <head> <title> xii-ip-2-basic html tag HTML-I </title> </head> <body leftmargin="60" topmargin=90 background = H:KVSlogo.jpg > <H1> LEVEL 1 HEADING TAG BY DEFAULT LEFT ALIGN </H1> <H2 ALIGN = CENTER> LEVEL 2 HEADING </H2> <H3 ALIGN = RIGHT > LEVEL 3 HEADING </H3> <H4 ALIGN = LEFT > LEVEL 4 HEADING </H4> <H5> LEVEL 5 HEADING </H5> <H6> LEVEL 6 HEADING </H6> HELLO STUDENT! WE ALL WISH A VERY BEST OF LUCK FOR YOUR EXAM. AND BELIEVE THAT U ALL WILL SHOW YOUR BEST. WE PRAY TO GOD TO GIVE YOUR BEST LUCK IN THIS EXAM. </P> <P> Notepad is a basic text editor that you can use to create simple documents. The most common use for Notepad is to view or edit text (.txt) files, but many users find Notepad a simple tool for creating Web pages.</P> <P ALIGN = RIGHT>Because Notepad supports only very basic formatting, you cannot accidentally save special formatting in documents that need to remain pure text. This is especially useful when creating HTML documents for a Web page because special characters or other formatting may not appear in your published Web page or may even cause errors.</P> <P ALIGN = CENTER>You can save your Notepad files as Unicode, ANSI, UTF-8, or big-endian Unicode. These formats provide you greater flexibility when working with documents that use different character sets. </P> <P ALIGN = LEFT>Notepad allows you to create and open documents in several different formats: ANSI, Unicode, big-endian Unicode, or UTF-8. These formats allow you to work with documents that use different character sets.</P> <BASEFONT SIZE=2> THIS IS A BOOK 2<BR> <BASEFONT SIZE=3> THIS IS A BOOK 3<BR> <BASEFONT SIZE=4> THIS IS A BOOK 4<BR> <BASEFONT SIZE=5> THIS IS A BOOK 5<BR> <BASEFONT SIZE=6> THIS IS A BOOK 6<BR>
  • 17. <BASEFONT SIZE=7> THIS IS <BASEFONT SIZE=8> THIS IS <BASEFONT SIZE=-2> THIS IS A BOOK 7<BR> A BOOK 8<BR> A BOOK 6<BR> '<FONT> HELLO </FONT> <FONT SIZE = 1 COLOR = BLUE > HELLO 1 </FONT> <FONT SIZE = 1 COLOR = #0000FF > HELLO 1 </FONT> <FONT SIZE = 2 COLOR = RED > HELLO 2 </FONT> <FONT SIZE = 2 COLOR = #FF0000 > HELLO 2 </FONT> <FONT SIZE = 3 COLOR = GREEN> HELLO 3 </FONT> <FONT SIZE = 3 COLOR = #008000> HELLO 3 </FONT> <FONT SIZE = 4 COLOR = TEAL > HELLO 4 </FONT> <FONT SIZE = 4 COLOR = TEAL > HELLO 4 </FONT> <FONT SIZE = 5 COLOR = AQUA > HELLO 5 </FONT> <FONT SIZE = 5 COLOR = #00FFFF > HELLO 5 </FONT><BR> <FONT SIZE = 6 COLOR = LIME > HELLO 6 </FONT> <FONT SIZE = 6 COLOR = #00FF00 > HELLO 6 </FONT> <FONT SIZE = 7 COLOR = MAROON> HELLO 7 </FONT> <FONT SIZE = 7 COLOR = #800000> HELLO 7 </FONT> <FONT SIZE = 8 COLOR =OLIVE > HELLO 8 </FONT> <FONT SIZE = 8 COLOR =#808000 > HELLO 8 </FONT> <FONT SIZE = 3 COLOR = PURPLE> HELLO 3 </FONT> <FONT SIZE = 3 COLOR =#800080> HELLO 3 </FONT> <FONT SIZE = +2 COLOR = SILVER> HELLO 5 </FONT> <FONT SIZE = +2 COLOR = C0C0C0> HELLO 5 </FONT> <FONT COLOR = YELLOW> HELLO </FONT> <FONT COLOR = FFFF00> HELLO </FONT> <FONT COLOR = GREY> HELLO </FONT> <FONT COLOR = 808080> HELLO </FONT> <FONT FACE = "Verdana"> VERDANA </FONT> <FONT FACE = "Comic Sans MS"> Comic Sans MS </FONT> <FONT FACE = "Arial Black"> Arial Black </FONT><BR> <FONT FACE = "Arial Black, Verdana"> VERDANA </FONT> <FONT FACE = "BRH Devanagari, Verdana, Arial Black"> VERDANA </FONT> <HR> ONE <HR SIZE=1> ONE SIZE MEANS THICKNESS <HR SIZE=2> TWO <HR SIZE=12> ABOVE IS 12 <HR SIZE=36> ABOVE IS 36 <HR SIZE=72> ABOVE IS 72 <HR SIZE=100> ABOVE IS 100 <HR SIZE=2 WIDTH =25> ABOVE 25 <HR SIZE=2 WIDTH =50> ABOVE 50 <HR SIZE=2 WIDTH =50%> ABOVE 50% <HR SIZE=2 WIDTH =70> ABOVE 70 <HR SIZE=2 WIDTH =100> ABOVE 100 <HR SIZE=2 WIDTH =100%> ABOVE 100% <HR SIZE = 12> ABOVE IS 3-D RULE <HR NOSHADE SIZE = 12> ABOVE IS 2-D RULE <!--- THIS IS A SINGLE LINE COMMENT PART ---> <!--- THIS IS MULTIPLE LINES COMMENT PART HELLO STUDENTS WE ARE STUDING HTML---> </body> </html>