In this lesson, let's get acquainted with the print command
So we use print to display a message. Very simple of using print would be to
display Hello World. So print displays text. The text is enclosed in single quotes and the
command ends with a semicolon. You can also use print with variables. So for instance, I can declare a variable such as
varchar, like my variable. I can set it to some characters and then I can just print the variable. So in this case
I have a variable called my variable. I'm setting it to I like SQL
And then I print my variable. And that will print the message I like SQL. I can also declare
a numeric value and then convert that to a character and print the value. So the key here is that
when you're using print, you are printing text. And if you have
other variables or values, they need to be first converted to text before they can participate in
the print commands. In this case, with this expression, we are casting our row variable, which is
an integer, into a varchar and then printing it. So let's look at some quick examples