How to restore database backup in SQL SERVER
In this article, I am going to explain the process of Database restoration using the SQL Server Management Studio. In...
2014-08-17
984 reads
In this article, I am going to explain the process of Database restoration using the SQL Server Management Studio. In...
2014-08-17
984 reads
This article explain the simple way to take up the backup of a database which can be easily understandable by...
2014-08-17
914 reads
Avg():- This function is used to get the average value of a numeric column
Syntax:-
SELECT AVG(column_name) FROM table_name
In this article,...
2014-08-14
879 reads
With IN clause, we can specify multiple values in a WHERE clause.
For example, in case of "IN", one can use...
2014-08-14
1,032 reads
LEN():- This function is used to get the length of the given string value.
Syntax:-
Select len (stringvalue)
For example,
...
2014-08-14
740 reads
LOWER():- This function is used to convert the value of a column to lower case
Syntax:-
Select LOWER (string)
or
SELECT LOWER(column_name) FROM table_name
For...
2014-08-14
583 reads
LTRIM ():- This function is used to get the string after the removal of leading blank spaces.
Syntax:-
LTRIM ( character_expression )
For example:-
Select LTRIM ...
2014-08-14
418 reads
Substring():- This function is used to return the specified number (third argument "len") of characters from a given string(first argument)...
2014-08-14
954 reads
UPPER():- This function is used to convert the value of a column to upper case.
Syntax:
SELECT UPPER(string)
OR
Select UPPER(Column name)...
2014-08-14
1,247 reads
And & Or:- These Operators are used to further filter the recordset return by SQL queries when more than one conditions...
2014-08-13
560 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers