Table dropped after creating view issue
A view is created on a table then I dropped the base table and created the base table once again with the same name then that view will works or not?
Details about force view why and we can use
Force View: creates the view regardless of whether or not the base tables exist or whether the user has privileges on them. The user still can’t execute the view, but he or she can create it. No...
Generally we are not supposed to create a view without base table. If you want to create any view without base table that is called as Force View or invalid view. Syntax: CREATE FORCE VIEW AS < SELEC...
Which function is used to trap the error code and error message of an exception
Raise_application_error(error number,error discription)
Hi,,
it is Raise_Application_error
There are five types of Triggers 1) Data Definition Language triggers: These triggers fire when you make changes to the objects in the database like create, update or delete. They can be implemented...
The function always return a SINGLE value, which includes arrays. Check out the table functions (pipelined), BULK_COLLECT, arrays etc... You can find plenty of examples. "plsql set...
What is the difference between ref cursor & normal cursor?
REF cursor is a dynamic cursor where as normal cursor is static cursor,In dynamic cursor single segment are process multiple SELECT statements dynamically at run time, where as in normal cursor we process only one select statement
The main reason is refcursor is a address it give the address of the location instead of item. It hold the different type of structures. Normal cursor holds a one structure of the table.
C. Table B gets created,but no rows gets inserted into Table A
hi
an empty table table (B) will be created there is a mistake un the first statement
no need to commit a Create instruction, so the rollback will have no effect
good luck
What is difference between a procedure & function ?
a function is always returns a value using the return statement. a procedure may return one or more values through parameters or may not return at all.
Answered by: krishnaindia2007
View all answers by krishnaindia2007
Member Since Sep-2007 | Answered On : May 3rd, 2008
1. Function is mainly used in the case where it must return a value. Where as a procedure may or may not return a value or may return more than one value using the OUT parameter.
Â
2. Function can be called from SQL statements where as procedure can not be called from the sql statements
3. Functions are normally used for computations where as procedures are normally used for executing business logic.
4. You can have DML (insert,update, delete) statements in a function. But, you cannot call such a function in a SQL query.
5. Function returns 1 value only. Procedure can return multiple values (max 1024).
6.Stored Procedure: supports deferred name resolution. Example while writing a stored procedure that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during creation but runtime throws error Function wont support deferred name resolution.
7.Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values
8. Stored procedure is precompiled execution plan where as functions are not.
Â
9.A procedure may modify an object where a function can only return a value The RETURN statement immediately completes the execution of a subprogram and returns control to the caller.
What is the difference between system procedure and system function?.
Also Procedure can be called from triggers but Function cannot be called from trigger. As function returns value. And no value can be returned to trigger.
Answered by: Sailaja Pasupuleti
Answered On : Dec 3rd, 2005A sub-query is a part of query. Sub-queries are useful to find unknown value(s).
Ex: To find details of employees who are getting maximum salary.
In this requirement, the maximum salary not mentioned.
Solution:
To find maximum salary,
select max(sal) from emp;
For that maximum salary the employee details,
select * from emp where sal = (select max(sal) from emp);
So, in the above query, "select max(sal) from emp" is also a query but it returns a value (unknown or not given) and compares with "sal" column. This query is called sub-query.
A query nested within another SQL statement is called a subquery.
simple reply nalini ..goodnagthumati_nagaraju@yahoo.co.in
The view will be INVALID,so you need to re-compile it after create that base table...
It will work either after base table drop and recreate or base table alteration.
Enjoy