Fname Lname City Pin
ramesh kumar salem 365241

Query to generate a code having the firstletter of
Fname,Lname & 3letter of city Last 3letter of pin,all in
capital letters

Answer Posted / mdeva

select ucase(mid(Fname,1,1)) as
FirstName,ucase(mid(Lname,1,1)) as
LastName,ucase(mid(City,3,1)) as Cty,ucase(mid(Pin,-3))as
PinCode from tablename

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to extract a unit value from a date and time?

491


Suppose you have to collect the first name, middle name and the last name of students from the below table. But, you observe that there few missing values either in the first name, middle name and the last name columns. How will you return the first non-null values?

468


How to get a version of mysql?

528


What does schema mean?

473


What is difference between mysql_connect and mysql_pconnect?

552






How many groups of data types?

515


What is the difference between mysql_fetch_assoc and mysql_fetch_array?

448


Is mysql still popular?

489


What is a storage engine?

555


In how many ways we can retrieve data in the result set of mysql using php?

615


How can you import tables from a sql file into a database by using the mysql client?

540


What is a text delimiter?

506


What does "i_am_a_dummy flag" do in mysql?

496


How can I create table in mysql?

515


How would concatenate strings in mysql?

526