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

Answers were Sorted based on User's Feedback



Fname Lname City Pin ramesh kumar salem 365241 Query to generate a code havi..

Answer / vardhan rao

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

Output:
FirstName LastName City Pincode
R K SAL 241

Is This Answer Correct ?    3 Yes 1 No

Fname Lname City Pin ramesh kumar salem 365241 Query to generate a code havi..

Answer / 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

Fname Lname City Pin ramesh kumar salem 365241 Query to generate a code havi..

Answer / sonali

select substr(ucase(Fname),1,1), substr(ucase(Lname),1,1),
substr(ucase(City),1,3), mid(Pin,-3) from emp

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is mysql enterprise edition?

0 Answers  


How do I grant privileges to a user in mysql phpmyadmin?

0 Answers  


What is the difference between the primary and unique key in mysql?

0 Answers  


What is a blob datatype?

0 Answers  


How do I restore a database in mysql workbench?

0 Answers  






What are the functions of mysql?

0 Answers  


In PHPmysql language how can we update our previous information.when update form open then we get our previous information in textbox,checkbox,selct,radio button.How can we show the information in checkbox,select menu,radio button which is available in database?

0 Answers  


How we can get distinct columns values in mysql?

0 Answers  


What is bdb (berkeleydb)?

0 Answers  


What is indexing in mysql?

0 Answers  


Give the syntax of GRANT commands?

3 Answers  


What does mysql flush privileges do?

0 Answers  


Categories