Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE [dbo].[StatisticsDemo](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](50) NULL
- ) ON [PRIMARY]
- SELECT NAME,COUNT(*) AS COUNT
- FROM StatisticsDemo
- GROUP BY NAME
- NAME COUNT
- -------------
- AABBCC 59999
- XXYYZZ 1
- CREATE NONCLUSTERED INDEX [NCI_STATISTICSDEMO_NAME] ON [dbo].[StatisticsDemo]
- (
- [Name] ASC
- )
- SELECT NAME FROM [dbo].[StatisticsDemo]
- WHERE NAME = 'AABBCC'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement