Oracle Difficulties [message #10746] |
Fri, 13 February 2004 22:07 |
Ravi Kadu
Messages: 3 Registered: February 2004
|
Junior Member |
|
|
Dear Sir,
First of all, I would like to thank all of you as I have received the significant answers from you to my previous queries, by which most of my queries / difficulties are solved.
However, following my few queries are not solved so far, therefore, please help / guide me.
Query No. 1
Previously I asked regarding following block and subsequently received answer from you, but it is not working at all as it returns error message " Bind variable "B" not declared.
Please explain..
SET SERVEROUTPUT ON
ACCEPT C PROMPT 'Give Percentage :';
DECLARE
A VARCHAR2 (10);
B NUMBER (10)!
;
BEGIN
A:='&Student_Name';
B:=&C;
IF B>=35 AND B<=40 THEN
DBMS_OUTPUT.PUT_LINE(A || 'Obtained "C" Grade' );
ELSIF B>=41 AND B<=59 THEN
DBMS_OUTPUT.PUT_LINE(A || 'Obtained "B" Grade' );
ELSIF B>=60 THEN
DBMS_OUTPUT.PUT_LINE(A || 'Obtained "A" Grade' );
ELSIF B IS NULL THEN
DBMS_OUTPUT.PUT_LINE('Sorry, we are unable to execute report of ' || A );
END IF;
END;
/
Query No. 2
As far as Oracle is concerned, it is full of security. However, From Oracle Navigator, we can delete any file, user etc, change the User password and change the privilege(s). if that is the case, then what about Oracle More Security….. (Please Explain)
Query No. 3
By Select * from Tab / Ind / Seq we can view the list of Tables, Indexes and Sequences respectively. Is there any provision to View User and its privileges?
Query No. 4
For instance, we have table named RAVI, in which there are 5 fields Name (Varchar2 (20), DOB (Date), Address (Varchar2 (20)), Contact (Number (10)), Remarks (Long). I have inserted 2-3 records in the same table. However later, I want to do following modifications / changes.
1. To delete / remove contact field from the table.
2. To increase size of Name field (from 20 to 30)
3. To decrease size of Address field ( from 20 to 15)
Please Provide the Commands / syntaxes for above 3 modifications
Again thanks a lot for you continuos support / guidelines.
Regards,
Ravi
|
|
|
Re: Oracle Difficulties [message #10762 is a reply to message #10746] |
Mon, 16 February 2004 05:37 |
rammohan
Messages: 13 Registered: March 2002
|
Junior Member |
|
|
query 1 : you have given an '!' next to number
query 3 : you can view your priv. using table dba_tab_privs or all_tab_privs
query 4 : a. alter table ravi drop column columnname
(available from 8i onwards only)
b. alter tale modify columname datatype(size
c. you cannot reduce the column size unless
it is empty.
|
|
|