How to find string or key value using pl/sql code?

Answers were Sorted based on User's Feedback



How to find string or key value using pl/sql code?..

Answer / gourvendra singh

if you want to find a string value you can use the
following command
select length(TRIM(TRANSLATE(string,'+-.123456789',' ')))
from dual;
string=value that u entered
if the result is null then the string is numeric else its a
character

Is This Answer Correct ?    5 Yes 2 No

How to find string or key value using pl/sql code?..

Answer / kumarvijay

var=1; --var='a'

select to_number(var) from dual;

if variable holds string it will through exception else it
will execute.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

Where is sql database stored?

0 Answers  


Explain what is a field in a database and record in a database?

0 Answers  


What is a pdo connection?

0 Answers  


what is “go” in t-sql? : Transact sql

0 Answers  


How much does sql certification cost?

0 Answers  






what is an alias command? : Sql dba

0 Answers  


how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00

3 Answers  


What are the two parts of design view?

0 Answers  


State few characteristics of pl/sql?

0 Answers  


What is pessimistic concurrency control? : Transact sql

0 Answers  


What is the maximum rows in csv?

0 Answers  


How would you go about increasing the buffer cache hit ratio? 0. Explain the difference between a hot backup and a cold backup and the benefits associated with each 1. You have just had to restore from backup and do not have any control files. How would you go about bringing up this database? 2. How do you switch from an init.ora file to a spfile? 3. Explain the difference between a data block, an extent and a segment. 4. Give two examples of how you might determine the structure of the table DEPT. 5. Where would you look for errors from the database engine? 6. Compare and contrast TRUNCATE and DELETE for a table. 7. Give the reasoning behind using an index. 8. Give the two types of tables involved in producing a star schema and the type of data they hold. 9. What type of index should you use on a fact table? 10. Give two examples of referential integrity constraints. 11. A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables? 12. Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each. 13. What command would you use to create a backup control file? 14. Give the stages of instance startup to a usable state where normal users may access it. 15. What column differentiates the V$ views to the GV$ views and how? 16. How would you go about generating an EXPLAIN plan?

2 Answers  


Categories