Create a new user:
CREATE USER amit IDENTIFIED BY abcdef DEFAULT TABLESPACE users
Grant the new user permissions so that he can login to database:
Grant create session to amit;
create table student( name varchar(20), rollno number primary key, dateofbirth date, standard number ); create table subject( id number primary key, title varchar(20) ); create table student_marks( subject_id references subject, student_id references student, marks number ); insert into student values ('Amit Kumar', 1, TO_DATE('18-JAN-1980'), 10); insert into student values ('Charu Kush', 2, TO_DATE('01-APR-1982'), 10); insert into subject values (1, 'Maths'); insert into subject values (2, 'Science'); insert into student_marks values (1, 1, 45); insert into student_marks values (2, 1, 55); insert into student_marks values (1, 2, 55); insert into student_marks values (2, 2, 65);
No comments:
Post a Comment