0% found this document useful (0 votes)
4 views1 page

SQL Table Creation and Data Insertion

The document outlines the creation of two database tables: CATEGORIE and CLIENT, with specified fields and relationships. It includes SQL commands for inserting data into these tables and altering the email field's size in the CLIENT table. Additionally, it grants specific permissions to user roles 'VIP' and 'GOLD' for both tables and commits the changes.

Uploaded by

ayoublahfas19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

SQL Table Creation and Data Insertion

The document outlines the creation of two database tables: CATEGORIE and CLIENT, with specified fields and relationships. It includes SQL commands for inserting data into these tables and altering the email field's size in the CLIENT table. Additionally, it grants specific permissions to user roles 'VIP' and 'GOLD' for both tables and commits the changes.

Uploaded by

ayoublahfas19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

CREATE TABLE CATEGORIE ( id_categ integer primary key, Nom_categ varchar2(15));

create table client(id int primary key, nom varchar2(15), prenom


varchar2(15),email varchar2(15),id_categorie int references categorie(id_categ));
SELECT * FROM CATEGORIE;
SELECT * FROM CLIENT;

insert into categorie values (1,'Client VIP');


insert into categorie values (2,'Client Gold');

insert into client values (111,'Ali','Hamou','[Link]@[Link]',2);


insert into client values (222,'Achraf','Ego','[Link]@[Link]',1);
insert into client values (333,'Saad','Bravo','[Link]@[Link]',1);
alter table client modify email varchar2(30);
insert into client values (444,'Mustapha','Bahamad','[Link]@[Link]',2);

grant select, insert, update, delete on categorie to VIP,GOLD;


grant select, insert, update, delete on client to VIP,GOLD;

commit;

You might also like