Encrypt and Decrypt in SQL Server

SQL Server ALL keyword

The ALL keyword is used to select all fields from a table using the asterisk "*" in a SQL SELECT statement.

Syntax:
SELECT ALL* FROM Table_name
-- CREATE TABLE AND INSERT ROWS
CREATE TABLE [dbo].[Tbl_Demo](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [Name] [varchar](500) NULL,
    [Age] [int] NULL,
    [IsActive] [bit] NULL,
    [IsDeleted] [bit] NULL,
 CONSTRAINT [PK_Tbl_Demo] PRIMARY KEY CLUSTERED 
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Tbl_Demo] ON 

GO
INSERT [dbo].[Tbl_Demo] ([ID], [Name], [Age], [IsActive], [IsDeleted]) VALUES (1, N'Anil Singh', 30, 1, 0)
GO
INSERT [dbo].[Tbl_Demo] ([ID], [Name], [Age], [IsActive], [IsDeleted]) VALUES (2, N'Aradhya', 3, 1, 0)
GO
INSERT [dbo].[Tbl_Demo] ([ID], [Name], [Age], [IsActive], [IsDeleted]) VALUES (3, N'Reena', 28, 1, 0)
GO
INSERT [dbo].[Tbl_Demo] ([ID], [Name], [Age], [IsActive], [IsDeleted]) VALUES (4, N'Sunil Singh', 27, 1, 0)
GO
INSERT [dbo].[Tbl_Demo] ([ID], [Name], [Age], [IsActive], [IsDeleted]) VALUES (5, N'Sushil', 22, 1, 0)
GO
SET IDENTITY_INSERT [dbo].[Tbl_Demo] OFF
GO

SELECT ALL* FROM [dbo].[Tbl_Demo]
--Result looks like,
ID Name        Age    IsActive IsDeleted
-------------------------------------------------
1 Anil Singh    30    1    0
2 Aradhya    3    1   0
3 Reena         28    1   0
4 Sunil Singh   27    1   0
5 Sushil    22    1   0

ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book