Comment

karthika
question,
April 25, 2009 at 11:03 PM

I need mysql queries for the following :

(A)i have table with column headings emp name and password
sno empname password
1 ani abcdefgh
2 venus bcde
3 joe bcdef
4 mary abcdef





Q1:I want a mysql query to select and display the passoword whose character length is from 3 to 6 (i.e bcde,bcdef..)

Q2:I want query to select the password whose second letter is c,third is d and ends with e

Q3:I want the query that combines the two above said questions

(B)i have the following database table

code place pincode
1 milli 641035
2 madurai 641045

Q1: i want query to select and display the following

mil35
"du10"

(Note:mil35 is the first three letters of place milli and last 2 digits of pin code 641035--first row
du is third and fourth letter of place madurai and third and fourth digit of 641045--second row)

(C)I have the following table

code empname status
1 ven inactive,active
2 bruce active
3 lary inactive,active

Q1: i want the query to make the status of " bruce" to "inactive" and lary's status to "active

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
WebSevices Questions

Select Box question
Select Box question   hello guys, i want to display data in a select box using foreign key,those data will come from other table which which is parent, that form will be in HTML(web ). i use oracle as database and i want using 

SQL Question

Select today's date sql
Select today's date sql   I wanted to show the data from database according to the current date. So, can anyone give me the select today's date sql query? Thanks!   select current date in mysql query select * from 

Programming Tutorials

Select Statement in SQL, SQL Tutorial
The SELECT statement for SQL       SELECT key word is used to select data from a table.  Syntax... the database table called "email", use a SELECT . SELECT  

PHP Questions

Select data from diplicated data
= mysql_select_db($database, $db_handle); if ($db_found) { $SQL = "SELECT...Select data from diplicated data  hello i have table location...++) { $SQL = "SELECT duration FROM core_network WHERE location=('".$location_c[$k 

SQL Tutorial

PHP SQL Select
of connection. To perform SQL Select query in PHP, we must create a database... PHP SQL Select       PHP SQL Select is used to execute mysql select query in the php application 

Programming Tutorials

SQL SELECT DISTINCT Statement
SQL SELECT DISTINCT Statement     ... with the select statement. The SQL Distinct clause is used with the Select statement... The Tutorial illustrates you an example from SQL Select Distinct 

SQL Question

database - SQL
check the current date. 3.If current date found in the table then select the particular question corresponding date. 4.If current date not found the select question randomly by rand() function query : "select * from tablename order 

WebSevices Questions

Database Sql question? - WebSevices
Database Sql question?  Given relation r (a, b,c), show how to use the exstended SQL features to generate a histogram of c versus a, dividing a into 20 equal-sized partions (that is where each partition contains 5 percent 

Java Beginners

question
question  i need to select data from database using mysql+java script+html   Please specify some more details 

SQL Question

SQL
SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d %M %Y') FROM 

SQL Question

SQL
SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d %M %Y') FROM 

Java Beginners

Transfer Data to Sql Database
Transfer Data to Sql Database  Hey guys, how to Transfer data to SQl database using Java? Transfer data already stored in excel to Sql databse using Java? Looking for an easier method so i can comprehend 

MySQL

Use of Select Box to show the data from database
Use of Select Box to show the data from database       Example program using Select Box to show retrieved data from database This example will describe you the use of Select Box in a JSP 

Java-Tutorials

JDBC: Select Database Example
JDBC: Select Database Example In this section, we will discuss how to select database using JDBC with example. Select Database : JDBC API provides a simple way to handle the database and execute the common sql query. Database 

SQL Tutorial

The SELECT statement for SQL
The SELECT statement for SQL       SELECT key word is used to select data from a table.  Syntax... the database table called "email", use a SELECT . SELECT  

SQL Tutorial

SQL SELECT DISTINCT Statement
SQL SELECT DISTINCT Statement     ... with the select statement. The SQL Distinct clause is used with the Select statement... The Tutorial illustrates you an example from SQL Select Distinct 

SQL Question

Inserting Data into mysql - SQL
Inserting Data into mysql  My sincere apologize for this post. I noticed there is no category for php. However am hoping my question will fit into the SQL category though under php. I need help with reading from a csv file 

SQL Question

mysql select statement - SQL
mysql select statement  i want to select id,name,age values from database.i created the following coding to select values from the table according to the id value which is selected by the user.pls help me select id,name,age from 

SQL Question

sql - SQL
(select,insert,update etc.), manipulate objects(DDL) and data(DML). PL/SQL.... 2 SQL tells the database what to do (declarative) while PL/SQL tell the database how to do things (procedural). 3 SQL is used to code queries, DML 

Struts Questions

Proplem with select data - Struts
Proplem with select data  Hi , Please can u give me a example for display all data from the database (Access or MySql) using Struts 

Java Beginners

Import Data to SQL database in Java
Import Data to SQL database in Java  Hi, I'm a beginner and I'm wondering how to Import Data to SQL database in Java? Thanks (Platform: Eclipse/SQL 

SQL Tutorial

Select data from Table in Database
Select data from Table in Database       The Select Statement is used to retrieve the selected data from table in database. The select query in the database retrieve 

PHP

Php Sql Select
more select query for retrieving data from database but in this example we show mysql_select_db method, how it work and how it is used in php application...Php Sql Select  This example illustrates how to execute mysql select 

Hibernate Tutorial Example

Insert Data into Database Using Hibernate Native SQL
Insert Data into Database Using Hibernate Native SQL... to insert data into database. Native SQL is handwritten SQL for all database... native sql for inserting data into database. Hibernate Native uses only 

JSP Servlet Questions

Select tag to fetch data from oracle database
Select tag to fetch data from oracle database  I created a select box having more than one menus in the select box such as regnno, address and name of a student and when regnno is selected from the drop down list by a user 

JDBC

JDBC Batch Example With SQL Select Statement
JDBC Batch Example With SQL Select Statement: In this example, we are discuss about SQL select statement with JDBC batch process. We will create SQL... will insert value in these table and then fetch data by using select statement 

JSTL

Retrieve data from database by using sql tag of JSTL SQL library
Retrieve data from database by using sql tag of JSTL SQL library... we will see how retrieve data from database using sql query given by user. To execute query first create a data source and then execute sql query 

SQL Question

database - SQL
am doing project in JSP Question & Answers. In my home page i have to display everyday 1 question as "Question of the day" from database. It should not change till the end of the day. Next day it should display another question. i am using 

SQL Question

delete data from database - SQL
delete data from database  HOw to delete specific data from table> I want to delete one record from database. Thnx  Hi friend, -------------------------------------------- Visit for more information 

SQL Question

database - SQL
database  For ex: Suppose there is 1000 questions (records) in my database. In my home page i want to display everyday 1 question as day of the question.It should not get change until date change...   Hi friend 

SQL Question

SET and SELECT
SET and SELECT  hello, What is difference between SET & SELECT in sql????   hii, SET : The set statement is used to the update query. SELECT : The select statement is used to display the all data's in the table 

Java Beginners

question
question  sir, i need a jsp+mysql query to select data from two table for a perticular user eg:select data from employee and leave table for john.please help me 

Java Beginners

Question about "Insert text file data into Database"
Question about "Insert text file data into Database"  Hey I was reading the tutorial "Insert text file data into Database", (awesome btw), and noticed that both a FileInputStream, a DataInputStream and a BufferedReader 

Java Beginners

question
question  Dear Sir, could you please send me a simple example of java and database connectivity with java and sql   Please visit the following link: JDBC Tutorials 

Java Beginners

question
question  how do i select four late from data base.late represents 'L 

SQL Question

insert and retrive data and time - SQL
insert and retrive data and time  hello everybody . Is there any... be retrieve that date and time from database ? ..........................   Hi friend, First to create table in database CREATE TABLE tablename 

Java Beginners

select query
select query  how to write select query with where clause having multiple variables. example: i want to select the data from DB in which i want to check againest two variable in where cluase. String sql = "select * from 

SQL Tutorial

SQL
, and SQL statements are used to establish relations between tables of data of database... for communicating with the database comprising editing, adding, and updating data in the database and, accessing data from the database. It is a standard 

SQL Question

Java and SQL - SQL
in getting a data to SQL. my problem is on how to come up with a pop up alert message in the user interface where in the message will be coming from the SQL... exactly you want to do whether you want to get or set data in your database and what 

Java Beginners

question
question  good afternoon, how to get user name and password according to current date,using mysql and jsp.please give me the code immediately.   hi , i think it is easy on executeQuery(); sql query is select uname 

Java Beginners

question
question  i need to select some details form database and that will displays on the same jsp page which is already contains some other details ,mustn't go to next page while i am clicking a link. have any option in jsp or java 

Struts Questions

question
question  I am doing a project using struts framework and spring jdbc .I have a issue that when data is inserted into database if we click the refresh button then the same data is again inserted in to the database.What 

Java Beginners

Select Employee and display data from access database in a jtable
Select Employee and display data from access database in a jtable  I there Iam a java beginner. I have to create a application where I can select... server, and implement the needed data objects in a database server. The clients 

JDBC Questions

question
question  how to retreive data from database of a particular user after login using jsp+hiberante+struts configuration.   Please go through the following links: http://www.roseindia.net/struts/hibernate-spring 

Programming Tutorials

SQL
, maintain & regulate access to your database. SQL*Plus SQL*Plus.... Commit Commit is an event that attempts to make data in the database identical to the data in the form. It involves writing or posting data to the database 

SQL Tutorial

SQL _ Wildcards
from data in a database. The SQL wildcards substitute one or more character, whenever there is a search for data in a table of the database... SQL _ Wildcards       

SQL Question

SQL
SQL Trigger query  Why we use the Trigger and what it's uses?   A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can 

SQL Question

SQL
?   A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications 

SQL Question

SQL
; A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications. Triggers 

SQL Question

SQL
?   A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications 

SQL Tutorial

SQL % Wildcards
SQL % Wildcards       SQL wildcards used for  searching one or more characters from data... 10 SQL % Wildcards Syntax SELECT 

PHP Questions

retrieve data from mysql database
;db ("test"); $term = $_POST['term']; $sql = mysql_query("select...retrieve data from mysql database  hi am not familiar in php.....even... selected value on combobox which is to be retrieve the relevant data from mysql 

JSP-Tutorials

Select query in JSP
that we use SELECT query. SELECT query is a retrieve the data from database than...(); String sql = "SELECT * FROM employeedetails"; resultSet...Select query in JSP We are going to describe select query in JSP 

SQL Question

SQL or UNICODE - SQL
, In Access database, declare the data type 'Text' to both the fields. You can use...SQL or UNICODE   Hi again............ I have got something new that........... i was using MS Access as the database with my JAVA Japplet 

MySQL

Mysql PHP Select
;Could not connect: ".mysql_error()); mysql_select_db($database,$link) or die("Error in selecting the database:".mysql_error()); $sql="Select... php select: To view the table data using php,  you need to connect 

JSP Servlet Questions

how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  //Customer Name: <select name="name"> <% try{ Class.forName...="select * from staff"; ResultSet rs=st.executeQuery(sql); while(rs.next 

Java Beginners

Jtable Question - Java Beginners
:access"); String sql = "Select * from data"; Statement stmt = con.createStatement...Jtable Question  Hello Sir, I have Created Database in MS access 2007 ,I want show the table data in to Swing JTable, How I can Show it, plz Help 

PHP Questions

Connection to Database
pages. Each page is configured to connect to my SQL database to query data... question is that how I can properly connect to my SQL database where I need...". I know that this is because of too many connections are requested from SQL 

Quartz Tutorials

SQL _ Wildcards
from data in a database. The SQL wildcards substitute one or more character, whenever there is a search for data in a table of the database... SQL _ Wildcards       

SQL Question

data copy - SQL
data copy   how to copy values of one column from one table into another column of another table?  Hi INSERT INTO table_name (column_name) AS SELECT DISTINCT VALUES FROM table_name (column_name 

SQL Tutorial

SQL Introduction
tasks such as insert, update or retrieve the data from database, In others word.... The common relational database using SQL are: Oracle, Microsoft SQL Server,Ingress,Access,etc.Normally. The most  database use SQL ,but these database have 

Java Beginners

data fecth from data base in( sql 2000) htmlform and jsp
data fecth from data base in( sql 2000) htmlform and jsp  hi iam using jsp and html form data fecth from database display the textbox help me i want whenever select from dropdown list select the projectname to display 

JSP Servlet Questions

how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Customer Name:<select name="name"> <% try{ Class.forName...=con.createStatement(); String sql="select * from staff"; ResultSet rs 

JDBC Questions

Data base related question
Data base related question  sir my table has only one element(that is pno),i am using ms-access as backend. i put only one element i want to retrieve...:odbc:oldp"); stmt2=con2.createStatement(); String st2="select * from pname order 

SQL Question

sql - SQL
the Query : "select * from question order by qno Asc" For more information...sql  i have fields as qno,subid,que,op1,op2,op3,op4,ans; and i am having 90 rows in that table .question is am willing to arragnge all the entries 

Programming Tutorials

Create Database in SQL,SQL Tutorial
Create a database       In this section, we will teach you to create a database.  First of all... database. Then create a database using the given syntax and give the suitable name 

Hibernate-Tutorials

Hibernate SELECT Clause
select clause for selecting the data from the database. Complete Code... clause. Use of SELECT clause in hibernate is as same as it used in SQL for selecting the data from the database. Example : Here I am giving a simple 

Java-Tutorials

JDBC: Select Records Example
to the database then write select query  and call executeQuery(sql... sql = "SELECT * FROM student"; rs = statement.executeQuery(sql...JDBC: Select Records Example In this section, you will learn how to select 

Java Magazine Questions

Java Question
Java Question  how can we increment the value of database SQL by using the java servlet program ? plz help me   Hi Friend, Try... rs=stmt.executeQuery("Select * from employee"); int id=0; if(rs.last 

SQL Question

MySql database - SQL
to retrieve the data from Ms-access then you create a database , table and create a connection with this. Then you retrieve the data from the database. Thanks... take images from a particular folder and data from MSAccess..please help me 

Development process Questions

Retriving data stored in database
Retriving data stored in database  Hi, How to retrive data from my sql database using Hibernate,Spring and tapestry please give me an example.I am new to this Hibernate and Spring 

SQL Tutorial

SQL Date
and data type using create table statement in database. The insert.... The data type for storing a date or date value in database is given... SQL Date       

SQL Tutorial

SQL-introduction
to access, modify and delete the customize data. SQL consist of data definition language... data in database and tables. The selected keywords which are used to perform the particular task are as under: SELECT - displays data from table UPDATE - updates 

MySQL

Mysql Nested Select
to view data inserted in table: mysql> select * from... Mysql Nested Select       Mysql Nested Select is a SELECT query that is nested within a Select, Update 

Quartz Tutorials

SQL ORDER BY
. SELECT ColumnName(s) FROM TableName ORDER BY ColumnName(s) SQL... SQL ORDER BY      .... Understand with Example The Tutorial illustrates an example from SQL 

JSP Servlet Questions

how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Can anybody...=con.createStatement(); String sql="select * from staff"; ResultSet rs... tutorial go through the link JSP Get Data Into Dropdown list From Database    

SQL Question

sql - SQL
sql functions with examples  I need sql functions with examples... color="#FF0033">Retrive data from database</font></h2>...{ Statement st = con.createStatement(); String query = "SELECT * FROM 

JSP Servlet Questions

data are not display in JSP from database - JSP-Servlet
data are not display in JSP from database   i want to finding some data through a SQL query from SQL server database to a JSP page based on some... i am not finding any data. it go only upto now data in rs now going to rs 

Java Beginners

Retrieve data from database in swing application
Retrieve data from database in swing application  I want to retrive data(doctor name,specilization,date) from my sql database...(); ResultSet rs=st.executeQuery("select * from data where id=1"); while 

JSP Servlet Questions

select date in desired format
select date in desired format  how to select date from the database in DD/MM/YYYY format, because if i am trying select data from the database i am getting value in yyyy/mm/dd and time format like below "2012-05-07 00:00:00.0 

MySQL

PHP SQL Injection
; and interaction with a database. A database contains data in tables and procedures...) or die("Could not connect: ".mysql_error()); mysql_select_db($database... PHP SQL Injection       

JSP Servlet Questions

displaying data retrieved from a database in a jsp page
displaying data retrieved from a database in a jsp page  the page... sql = "select billid, customerid, billdate, status from customerbills where...(sql); stmt.setString(1, custId); ResultSet rs = stmt.executeQuery(); if (rs.next 

JSP-Tutorials

Display Data from Database in JSP
, to show data from the database click on the link that calls another .jsp file named...;body> <h2>Data from the table 'stu_info' of database 'student'</h2... sql statements to the specified database. */ statement 

JDBC Questions

Sql - JDBC
SQL Statement and prepared statement  What is Statement and prepared... declared in JAVA.SQL.While you connecting to a database these are required.If... = conn.prepareStatement( "SELECT i.*, j.* FROM Omega i, Zappa j" + "WHERE i = ? AND j 

SQL Question

Sql question
Sql question  How to display duplicate values in Sql?   Hi Friend, Please visit the following link: http://www.roseindia.net/sql/mysql-example/mysql-finding-duplicate-records.shtml Thanks 

SQL Question

Data Conversion In Sql Server 2005
Data Conversion In Sql Server 2005  Hi I am working vb.net & sql server 2005 database. I am storing date (MM/DD/YYYY) format. now I have problem in sql date conversion (DD/MM/YYYY). Can you help how to convert date 

Struts Questions

selecting data from database
selecting data from database  how to select data from database using Dao in struts   Hi, You have to load the data from database using hibernate and send the data in a Java file object to jsp page. Please read at http 

SQL Question

sql - SQL
sql  HI good morning.. I want store the image into database table.. How is it possible .. this is done in Servlets please send the example and also what is the data type for image in database.. pleas send 

SQL Question

updating a table in a database - SQL
("update data set name='"+v1+"',address='"+v2+"' where id=4 

SQL Question

How to get the most recent data from the sql database
How to get the most recent data from the sql database  Hi, just wanted to show the most recent row from the database table...in my web page. for example if i have four records in the table that was added on different different 

JDBC

Understanding Common SQL statements
SQL Select statement: The SELECT statement is used to select data from... of the select statement. It is used to separate each SQL statement in database systems...; The result from a SQL query is stored in a resultset. The SELECT statement has mainly 

SQL Question

SQL - SQL
SQL  Hello Sir, Can u please tell me how to store an image path or image name in Access 2003 Database. Actuall i stored an image in database but it get stores in this way .ong.binary data. But i want to store 

Swing AWT

database
database  I want to let the user select one of the database type(mysql,ms sql or db2) from the combo box present on the swing gui and then let him give the name of the database name that he want to create in a textfield 

SQL Question

Database
Database  is it possible to view the query code after executing it.if yes tell me the procedure.   Yes, if you want to retrieve the data that is stored in database, then use the given query: select * from student 

Free SQL books

SQL Example, Codes and Tutorials
the format of the data column  in the database.   SQL Create... with the Select statement to show all unique records from database.   SQL LEFT... language to interact with the database. SQL allows you to create, delete, update 

JSP Servlet Questions

jsp programe for displaying data from database
to insert data into database and also want to display the things i have entered..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them 

JSP Servlet Questions

jsp programe for displaying data from database
to insert data into database and also want to display the things i have entered..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them 

JSP Servlet Questions

jsp programe for displaying data from database
to insert data into database and also want to display the things i have entered..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them 

SQL Question

DBMs - SQL
in question 2, create a physical database design 6.Implement the database...DBMs  The University Accommodation Office Data requirements specification Data requirements ----------------Students 

SQL Question

Help with SELECT/JOIN statement
Help with SELECT/JOIN statement  I have two tables (t1 and t2) that each have the same columns. t1 has data and t2 has changes to the data. I want a select statement that will return me all rows of t1 but, when t1.id = t2.id, I 

Advertisements Advertisements
 

 

 

DMCA.com