Missing right paranthesis create views [closed]

I want to create view

Create view vetudiant(matricule,sexe,ville,tel,email,idDep) 
as select (matricule,sexe,ville,tel,email,idDep) from etudiants;

This is table of etudiants:

create table etudiants (
    matricule varchar2(50) primary key,
    nom VARCHAR2(50),
    prenom VARCHAR2(50),
    sexe CHAR(1),
    ville VARCHAR2(50),
    tel VARCHAR2(50) constraint fk_tel unique,
    email VARCHAR2(50) constraint fk_email unique,
    idDep varchar2(50),constraint fk_dep foreign key (idDep) references departement(idDep)
);

Problem:

missing right paranthesis

I try to create view but I have error missing right paranthesis

  • Remove the brackets in the SELECT clause. Create view vetudiant(matricule,sexe,ville,tel,email,idDep) as select matricule,sexe,ville,tel,email,idDep from etudiants; fiddle

    – 




  • You don’t need parentheses after the SELECT statement when defining the columns for the view.

    – 

Leave a Comment