How to process in Mysql with select

Asked

Viewed 66 times

0

I would like to know how to create a project that select in several fields of a table.

Would be a select list, I tried to do but I have no idea where to start.

DELIMITER //
CREATE PROCEDURE prCriarDocente ()
  BEGIN
  START TRANSACTION;
    SELECT upkDocente, strProntuario, strNome, strEscolaridade, dtNascimento 
    COMMIT;
  END //

1 answer

0

I believe that what you want to do is a view not a previous, the view that would be a "visualization" of a query, follows the example:

CREATE THE VIEW:

CREATE VIEW [NOME DA VIEW]
AS
SELECT 
    [PASSAR OS CAMPOS]
FROM 
    [TABELAS]
WHERE
    [CONDIÇÕES]

CONSULT THE VIEW:

SELECT * FROM [NOME DA VIEW]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.