DECLARE @myInt INT = 42;
SELECT @myInt;
DECLARE @myDate DATETIME = '2023-10-07 15:30:00';
SELECT @myDate;
DECLARE @myString VARCHAR(50) = 'Hello, SQL!';
SELECT @myString;
-- Create a table to store Unicode text
CREATE TABLE Greetings (
ID INT PRIMARY KEY,
IndianGreeting NVARCHAR(100)
);
-- Insert an Indian greeting in English into the table
INSERT INTO Greetings (ID, IndianGreeting)
VALUES
(1, N'Namaste, SQL Server!'); -- "Namaste" is a common Indian greeting-- Retrieve and display the Indian greeting from the table
SELECT * FROM Greetings;
DECLARE @myBinary VARBINARY(MAX) = 0x48656C6C6F;
SELECT @myBinary;
DECLARE @myVariant SQL_VARIANT = 'OpenAI';
SELECT @myVariant;
DECLARE @myVariable INT;
SET @myVariable = 100;
DECLARE @myVariable INT;
SET @myVariable = 42;
DECLARE @myVariable INT;
SET @myVariable = 73;
SELECT @myVariable;