Archive for the 'Scripts' Category

Creating tables
Monday, February 11th, 2008

To create a new table in our database, we use the CREATE TABLE statement. It’s very similar to the sentence in oder database systems. But in Oracle we can specify some Oracle specific features such as the storage or the tablespace.
Here it is an example of use of the CREATE TABLE statement.
CREATE TABLE AYUDA
(
ID NUMBER(10) […]

Revoking privileges
Friday, January 11th, 2008

We can revoke priviliges on tables and functions/procedures using REVOKE. Let’s see a couple of example to better understand it.
We can revoke privileges for common DML statements (select, insert, update and delete). We use sentences like this:
REVOKE select, insert ON mytable FROM myuser;
We can also revoke privileges for some DDL statements. If we want to […]

Granting privileges
Monday, January 7th, 2008

We can grant priviliges on tables and functions/procedures using GRANT. Let’s see a couple of example to better understand it.
We can grant privileges for common DML statements (select, insert, update and delete). We use sentences like this:
GRANT select, insert ON mytable TO myuser;
We can also grant privileges for some DDL statements. If we want to […]

ORA-06502 PL/SQL: numeric or value error
Monday, December 17th, 2007

This error message is very tricky. Here, you can learn how to solve it.

The main cause that produces this message is that you are assigning a value NULL to a variable that does not admit it.
DECLARE
N1 number(2) NOT NULL :=20;
N2 number(2);
BEGIN
N1 := N2;
END;
Another possible cause is that you are assigning a number to a variable […]