Share on Google+Share on Google+

jeevani
sql functions with examples
1 Answer(s)      9 years ago
Posted in : SQL

I need sql functions with examples to learn fast.

Ads

View Answers

April 14, 2008 at 7:20 PM


Hi friend,

<%@ page language="java" import="java.sql.*,java.util.*,java.text.*" %>
<html>
<head>
<title>Retrive value from database</title>
</head>
<body>
<table border="0" width="50%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<h2><font color="#FF0033">Retrive data from database</font></h2>
<form method="POST" >
<table border="1" width="50%" cellspacing="0" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="50%" valign="right"><b>User ID:</b></td>
<%
Connection con = null;
String url = "jdbc:mysql://localhost:3306/";;
String db = "register";
String driver = "com.mysql.jdbc.Driver";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,"root","root");
try{
Statement st = con.createStatement();
String query = "SELECT * FROM userid where empname='amardeep'";
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
%>
<td width="50%" valign="right"><%=rs.getInt("id")%><br/></td>
<tr>
<td width="50%" valign="right"><b>User Name:</b></td>
<td width="50%" valign="right"><%=rs.getString("empname")%><br/></td>
</tr>
<%}
rs.close();
con.close();
}
catch (SQLException ex){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}
%>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>

-------------------------









Related Tutorials/Questions & Answers:
SQL Aggregate Functions First
SQL Aggregate Functions First       SQL Aggregate Function First, that performs calculation... illustrate an example from SQL Aggregate Functions First. The Example create a table
SQL tutorial with examples
SQL tutorial with examples  Hi, I am looking for good SQL tutorial with examples code. Please give me good urls for SQL tutorial with example code which can be downloaded and easily used. Thanks   Read at SQL Example
Advertisements
SQL Aggregate Functions In Where Clause
SQL Aggregate Functions In Where Clause       SQL Aggregate Function In Where Clause return... with Example The Tutorial help you to understand an Example from 'SQL Aggregate
Aggregate Functions in SQL, SQL Tutorial
Aggregate Functions       In this section we are going to illustrate aggregate function, with the help... and many more in SQL. They are briefly described and denoted by the keyword
SQL Aggregate Functions Group By
SQL Aggregate Functions Group By       SQL Aggregate Functions Group By return the aggregate... with the use of 'SQL Aggregate Functions Group By'. In this example, we
PHP Date Examples, PHP Date functions
Tutorials series we will show the usages of PHP Date functions with examples.   PHP Date function examples
SQL Aggregate Functions
SQL Aggregate Functions       SQL Aggregate Functions is built in function that is used... illustrate an example from 'SQL Aggregate Function'. To understand and grasp
Sql Examples using php code
Here is the many examples. In this tutorial we discuss many examples of sql statements using php code
SQL Aggregate Functions Group By
SQL Aggregate Functions Group By       SQL Aggregate Functions Group By return the aggregate... with the use of 'SQL Aggregate Functions Group By'. In this example, we
SQL Aggregate Functions Where Clause
SQL Aggregate Functions Where Clause       SQL Aggregate Functions Where Clause is used to perform  various Functions like Sum, Count, Average, Maximum and Minimum. Understand
PHP Functions, PHP Functions Tutorials
PHP Functions In this section we will understand important PHP functions with the help of example code. What is Functions? Function is a block of code...; } Functions in PHP PHP provides many built-in functions to do the real job
SQL Aggregate Functions List
SQL Aggregate Functions List       SQL Aggregate Functions List describe you the Aggregate Function... queries. Understand with Example The Tutorial illustrate an example from SQL
SQL Date, SQL Date Examples
; In this we are going to discuss about the SQL Date functions. SQL stands... will be able to use the SQL Date functions effectively in your program. Here...; SQL Date and Time Functions The Tutorial illustrate
SQL Aggregate Functions Where Clause
SQL Aggregate Functions Where Clause       SQL Aggregate Functions Where Clause return you... with Example The Tutorial illustrate an example from 'SQL Aggregate Functions
PHP Files management functions and examples.
language provides many functions for the manipulation of files from the PHP program. Here in this section we will learn about all the PHP file functions.  
examples
; my sql   Hello Friend, So you want to get different examples...examples  Hi sir...... please send me the some of the examples... questions .   Hello Friend, Which type of connectivity examples do you
SQL Aggregate Functions First
SQL Aggregate Functions First       SQL Aggregate Function First, that performs calculation... illustrate an example from SQL Aggregate Functions First. The Example create a table
SQL Aggregate Functions In Where Clause
SQL Aggregate Functions In Where Clause       SQL Aggregate Function In Where Clause return... with Example The Tutorial help you to understand an Example from 'SQL Aggregate
JPA Examples
, JPQL functions, using Eclipse IDE to develop and compile the examples. Here...JPA Examples In this section we will discuss about the examples of JPA. This section will describe you the various examples that will help you create JPA
SQL Functions
SQL Functions      ... Statement Mysql Merge Statement is used to merge the two sql statement using UNION clause.The UNION clause is used to combine the result set of any two sql
PHP Examples
In this section of PHP examples, the new bees will learn the basic examples of most common used functions. These examples will help to the experts too... examples from several functions to sessions, class and objects. The examples
What is functions?
What is functions?  Hi, Please tell me about PHP functions? Thanks in advance
What is functions?
What is functions?  Hi, Please tell me about PHP functions? Thanks in advance
What is functions?
What is functions?  Hi, Please tell me about PHP functions? Thanks in advance.   About Functions: Functions in PHP is block of code... functions and use it multiple times. In PHP there is many pre-defined functions
Inbuild functions
Inbuild functions  List all the inbuild functions in java
Functions and Methods
Functions and Methods  Write a Java program to input the sides of a triangle. Pass the sides to a function decide(int x,int y,int z) which checks and prints whether the triangle is equilateral,isosceles or scalene.   
Hibernate Criteria Aggregate Functions Example
Hibernate Criteria Aggregate Functions Example  I need Hibernate Criteria Aggregate Functions Example program with source code, I want example of Hibernate Criteria Aggregate Functions? Can anyone share me the source code
Functions and Methods
Functions and Methods  (1) Write a program in java to input 10 numbers. Use a function to find and print the cube of each number. (2) Write a program in java to input day number. Use a function daysofweek(int dysno) to accept
static functions
static functions  Give some brief defenition for 1. Static Variables 2. Static Functions 3. Instance Variable  Static Variables Static variables are class variables that are shared by all instance of class .. 1
sql - SQL
sql functions with examples  I need sql functions with examples to learn fast.  Hi friend,<%@ page language="java" import...("SQL statement is not executed!"); } } catch (Exception e
sql
difference between sql and oracle  what is the difference between sql and oracle
Tutorials   
Java Spring Hibernate Struts Training How to Fetch Data using dropdown option How to get day from date in SQL? Example of sorting results in MySQL Distinct and Limit example in MySQL How to download install and use MySQL workbench? Example of Average, Sum, Min and Max functions in MySQL How to delete data from MySQL? Update SQL Query Example Order by example in MySQL AND and OR Operators in MySQL Query Where clause with query in MySQL How to use select Statement in MySQL? How to insert data into MySQL Table? Create Database and tables in MySQL example of before insert trigger in mysql Failed to Call Procedure MY Sql Query Error - Not able to Understand the issue which query will be run for previous(button) question How to access data yearly from DB in C# ? Fastest way to upload huge raw data in database - c#, Java or stored procedure DB Insert Nb hours between 2 time stamps meets specific criteria mysql select into table from another table example MySQLselect into new table Example code How to create a .mdf file from script (.sql) Please help me out fixing broken relational links in MySQL database after an upgrade How do I upgrade mysql? mysql 4.x to 5.x upgrade problem Upgrading a PHP/MYSQL application? upgrading sql query join phpmyadmin in whm whm php version update php cpanel cpanel mysql downgrade cpanel mysql version upgrade mysql whm upgrade mysql 4 5 cpanel upgrade mysql cpanel server Did my upgrade from mySQL 5.1 to 5.5 work Upgrade to MySQL 5.5 ? - cPanel Mem use upgrade from MySQL 5.1 to 5.5 - cPanel Upgrading MySQL from 5.0 to 5.1 or 5.5 - cPanel Mysql Upgrade on WHM (Mysql 5.1 to 5.5)cPanel Mysql Upgrade on WHM (Mysql 5.1 to 5.5) - cPanel Updating from MySQL 5.0 to 5.5 cPanel MySQL 5.1 upgrade to 5.5 error Charset problem upon publishing PHP + MySQL website MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist SQL Error Version 5.5.15

Ads

 
Advertisement null

Ads