-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUSERS_SELECT.sql
More file actions
23 lines (21 loc) · 774 Bytes
/
USERS_SELECT.sql
File metadata and controls
23 lines (21 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-------------------------------------------------------------------------------------------------
-- USERS_SELECT
-------------------------------------------------------------------------------------------------
SET NOCOUNT ON;
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
-------------------------------------------------------------------------------------------------
USE VideoHosting;
IF NOT EXISTS (SELECT 1 FROM [sys].[tables] WHERE [name] = N'USERS') BEGIN
PRINT N'❌ TABLE [USERS] WAS NOT FOUND';
END ELSE BEGIN
SELECT
[USER].[UID],
[USER].[USERNAME],
[USER].[EMAIL],
[USER].[BIRTHDAY_DT],
[USER].[CREATED_DT] [REGISTER_DT]
FROM [USERS] [USER]
ORDER BY [USER].[USERNAME];
END;