INT3
Example
Section titled “Example”CREATE TABLE Test ( ID INT3, Description VARCHAR(100));
INSERT INTO Test (ID, Description)VALUES (1, 'First record'), (2, 'Second record');
SELECT * FROM Test;Output
Section titled “Output”+----+----------------+| ID | Description |+----+----------------+| 1 | First record || 2 | Second record |+----+----------------+Explanation
Section titled “Explanation”The code shows a table creation with two columns, “ID” and “Description”, where the data type of “ID” is INT3. It then inserts two records into this table. Finally, the SELECT statement retrieves all the records from the table displaying them as the output. The INT3 data type stores integer values, allowing for more efficient database storage.
Example
Section titled “Example”DECLARE @TempTable TABLE (Count INT);INSERT INTO @TempTable VALUES (3), (5), (7);SELECT COUNT(*) FROM @TempTable WHERE Count < 6;Output
Section titled “Output”2Explanation
Section titled “Explanation”The given SQL script declares a table variable @TempTable and inserts three integer values into it: 3, 5, and 7. Then, the script counts and returns the number of rows in @TempTable where the value of Count is less than 6. The output 2 indicates that there are two values less than 6 in the table.