-
Sql query
What is sql query to retrieve the second effective employees from job data for all the employees?
-
-
Materialised View
What is difference between a table and a materialised view, a view and a materialised view?
-
Findout the Least Null Values column and print out that column records ?
I `ve 1 table with 3 colums A,B,C
A B C
1 3 5
4 null 6
8 2 null
null 1 null
null null 9
5 null 6
3 5 7
null null 3
-
Question on Constraints
I am new to Oracle. I have created one table in that one column name salary, while creating the table I have given the datatype for that column is varchar2 and also I have given not null constraint. Now I want to change the datatype varchar2 to number, Is it possible to alter the datatype when having constraint in table?
-
Write a query for split one column to multiple columns
I have a source table with one column of 15 characters and I want output like divide the 15 chars column into multiple of 3 columns like every column 5 chars
source empnoorderprdct target empno order prdct -
Alternative NULL values
Source:
col1 col2
1 Will
2 John
3 Josh
4 Devin
Target:
col1 col2
1 Will
2 NULL
3 John
4 NULL
5 Josh
6 NULL
7 Devin
8 NULL
I want the SQL query for the... -
What does the following query do?
SELECT SAL + NVL(COMM,0) FROM EMP;This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary.
-
What is the use of CASCADE CONSTRAINTS?
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.
-
What are the wildcards used for pattern matching?
_ for single character substitution and % for multi-character substitution
-
-
-
-
-
-
What is the main difference between the IN and EXISTS clause in subqueries??
The main difference between the IN and EXISTS predicate in subquery is the way in which the query gets executed.IN -- The inner query is executed first and the list of values obtained as its result is used by the outer query.The inner query is executed for only once.EXISTS -- The first row from the outer query is selected ,then the inner query is executed and , the outer query output uses this result...
-
while this query dint work :
"select * from (select rownum,a.* from emp a) where rownum=70;"
2. as i've read that rownum can work only for < and <= but not for = or > or >=, then why the query worked for rnum=70">1. Why is it so that the given query worked :"select * from (select rownum rnum,a.* from emp a) where rnum=70; "while this query dint work :"select * from (select rownum,a.* from emp a) where rownum=70;"2. as i've read that rownum can work only for < and or >=, then why the query worked for rnum=70
-
-
Employee Query question
Suppose im having employee table with fields, eno, ename, dept, address1, address2, address3. In address field employee can fill only address1 or address2 or address3... at a time he can fill three address fields. now i want all employee names who filled only one address field..
Ans