MySQL Forums
Forum List  »  Newbie

want mysql queries for the shown database tables
Posted by: karthikam mohandas
Date: April 25, 2009 07:54AM

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"

Options: ReplyQuote


Subject
Written By
Posted
want mysql queries for the shown database tables
April 25, 2009 07:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.