Write a query to extract first 5 characters of a name in the column Stud_Name?



Write a query to extract first 5 characters of a name in the column Stud_Name?..

Answer / shubham

select substr(Stud_Name,1,5) from Table;

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More DB2 Interview Questions

difference between group clause and order clause

1 Answers  


What is the picture clause of null indicator variable?

0 Answers  


How do I start db2 in windows?

0 Answers  


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

0 Answers   MCN Solutions,


how to check the table is empty or not?

3 Answers   IBM,






Where can you declare a cursor in a cobol-db2 program?

0 Answers  


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

0 Answers  


How can you quickly find out the number of rows updated after an update statement?

1 Answers   CSI, CTS,


What is dclgen in db2?

0 Answers  


what is the process of precompiler?

2 Answers  


i have cobol+ db2 program but it contains n number of subprograms for this how many dbrm members i need to mention in bind process

2 Answers  


Why do chiropractors use drop table?

0 Answers  


Categories