-
Write sql query to get the below required output
I have table with col1 values , col2 1st row value should be same col1 1st row, then col 2 row onwards row each should added each row values eg: col1 values 10,20,30. Etc, in col2 values display like 10, 30,60 etc. how we can write sql query ?
-
What are different Oracle database objects?
TABLESVIEWSINDEXESSYNONYMSSEQUENCESTABLESPACES etc
-
-
-
-
-
How to convert rows in column using SQL in Oracle
How to convert rows in column using SQL in Oracle;
for example
sl_no
1
2
3
4
output is 1234;
How to convert one column value into rows using SQL
for example
employee_name
Kumar
output
K
u
m
a
r -
-
Literal meaning of SQL
What is the literal meaning of SQL
-
-
-
When do you use WHERE clause and when do you use HAVING clause?
HAVING clause is used when you want to specify a condition for a group function and it is written after GROUP BY clause. The WHERE clause is used when you want to specify a condition for columns, single row functions except group functions and it is written before GROUP BY clause if it is used.
-
-
Pair Wise & Non-Pair Wise Columns
What are Pair Wise & Non-Pair Wise Columns?
-
-
List the premium customers who is not using the service within the last one week.
List the premium customers who is not using the service within the last one week.if you have these tables: 1-'Premuim_USER'columns: Customer_ID, post_paid.2-'calls'columns: called_number, Customer_ID, call_date, call_time_started, Call_time_ended, transaction_no.
-
-
Display the number value in Words?
SQL> select sal, (to_char(to_date(sal,'j'), 'jsp'))from emp;the output like,SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))--------- -----------------------------------------------------800 eight hundred1600 one thousand six hundred1250 one thousand two hundred fiftyIf you want to add some text like, Rs. Three Thousand only.SQL> select sal "Salary ",(' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.'))"Sal...
-
Fetch Alternate Rows
How to fetch alternate rows from the table?
-
Retrieve Rows Without Using SELECT Clause
How can we retrieve some rows from the database without using select clause?
Oracle SQL Interview Questions
Ans