Change the setting of MYFIRSTSEQ so that the minimum value t
Solution
5.Alter sequence MY_FIRST_SEQ minvalue -1000;
6.
TABLE CREATION:
create table email_log ( emailid numeric(10), emaildate date, customer# numeric(10), constraint emailog_pk primary key (emailid) )
1.emaildate = current date and customer# = 1007
This will fail as there is no value for emailid column and being the primary key you must assign a value for the field.
Below is the error that will pop up:
ORA-00947: not enough values
2. This one will also fail as we have not specified any default value to emailid column. If you want to use a default value for any column you must declare it at the time of table creation. According to the question we have created the table and there is no mention of creating default values for emailid column.
3. This one will work fine. Below is the insert SQL.
insert into email_log (emailid,emaildate,customer#) values (25,current_date,1009);
7.CREATE SYNONYM NUMGEN FOR MY_FIRST_SEQ;
8. View the synonym:
select numgen.currval from dual; (Please note you have to call nextval at least once before you call currval.)
Delete NUMGEN:
Drop synonym numgen;
Delete MY_FIRST_SEQ:
Drop sequence MY_FIRST_SEQ;
9.Create index:
CREATE BITMAP INDEX
cust_bitmap_idx
ON customer (state);
View index:
select * from all_indexes where table_name = \'CUSTOMER\';
Delete Index:
drop index cust_bitmap_idx;

