ALTER PROCEDURE ageUser @age int, @firstName varchar(60), @lastName varchar(60)
AS
BEGIN
DECLARE @fullName varchar(200);
DECLARE @year int;
SET @fullName = (SELECT CONCAT(@firstName,' ',@lastName));
SET @year = (SELECT DATEPART(YYYY, GETDATE()) - @age);
print('Mi nombre es: '+@fullName);
print('edad: '+ CAST(@age AS VARCHAR(10)));
print('Año de nacimiento: '+ CAST(@year AS VARCHAR(10)));
END
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.