Could someone please decide if the query syntax of these tables is correct?

0
CREATE PROCEDURE usp_ConsultarLibro  
@id_Libro char(3)  
as  
Select  
IdLibro,   
Titulo,  
NomApe_Autor,  
Nombre_Categoria,   
Nombre_Editorial,  
Nombre_Idioma,  
Año_Lanz  
FROM  LIBRO L  
INNER JOIN AUTOR A ON L.IdAutor = A.IdAutor  
INNER JOIN CATEGORIA C ON L.IdCategoria = C.IdCategoria  
INNER JOIN EDITORIAL E ON L.IdEditorial = E.IdEditorial  
INNER JOIN IDIOMA I ON L.IdIdioma = I.IdIdioma  
where IdLibro=@id_Libro  
GO  

Is it necessary to put the abbreviations before the names of the fields?

    
asked by Daynine 29.05.2018 в 11:09
source

1 answer

1

Yes, you should put the name of the alias before the attributes of the select (L.IdLibro, L.Titulo, etc).

Depending on the manager you are using, autocompletion can help or not. In the case of Oracle, it does help.

    
answered by 29.05.2018 в 11:42