Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This Category lists all questions related to all different kind of databases
how to concatenate two string or two values in oracle sql ?
It is ||, for example: select 'Mr ' || emp_name from employees; or concatenate two column values by : select first_name || '-' || last_namefrom employees;
It is ||, for example:
or concatenate two column values by :
See lessHow to create array variable in oracle pl/sql ?
Basically VARRAY is varying array type that is typically used when the number of instances to be stored is small that means if we have one customer and this customer have number of phone numbers in our case if we know exact how many phone number he has so we will use VARRAY otherwise we will go forRead more
Basically VARRAY is varying array type that is typically used when the number of instances to be stored is small that means if we have one customer and this customer have number of phone numbers in our case if we know exact how many phone number he has so we will use VARRAY otherwise we will go for using nested tables.
You can use VARRAY data type for:
Now We can use VARRAY for a fixed-size array
Or TABLE for an unbounded array like:
for clarification we submit question and it’s answer to help others, please if you have any addition don’t hesitate to share with others here.
See lesshow to Order by string in SQL ?
In standard SQL, you need a case statement Select * From people ORDER BY (case when names = 'john' then 1 when names = 'steve' then 2 when names = 'bob' then 3 when names = 'bill' then 4 else 5 ); You can find this article helpful for you in case you are using Oracle database: Oracle Case StatementRead more
In standard SQL, you need a
case
statementYou can find this article helpful for you in case you are using Oracle database:
Oracle Case Statement : (Simple Case, Searched Case)
Some SQL engines have shortcuts to this, but you don’t mention which database you are using.
See lessFor instance, in MySQL you can do: