Can we use AS keyword at the end of the query like this: SELECT CONCAT(FirstName, LastName) FROM Employees AS Name; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we use AS keyword at the end of the query like this: SELECT CONCAT(FirstName, LastName) FROM Employees AS Name;

I am getting confused, where to put the AS keyword, at the end or before the FROM.

14th Jun 2020, 5:41 PM
shiwangee pathak
shiwangee pathak - avatar
2 Answers
+ 2
AS should be positioned after each "column" variable, as it is a shortcut of ALIAS. SELECT CONCAT(First name, LastName) AS Name FROM Employees; In most SQL versions it even can be omitted, so you can just write: SELECT CONCAT(First name, LastName) Name FROM Employees;
14th Jun 2020, 5:49 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Thanks for the help. :)
14th Jun 2020, 5:51 PM
shiwangee pathak
shiwangee pathak - avatar