This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RealNumbersInfinity : IEnumerator<int> | |
{ | |
private int i = 0; | |
private int limit; | |
public RealNumbersInfinity(int limit) | |
{ | |
this.limit = limit; | |
} | |
public int Current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace AwaitTest | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from sys.database_files | |
DBCC SHRINKFILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [DB] | |
GO | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM master.sys.extended_procedures; | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE TSQL2012; | |
SELECT custid, region | |
FROM Sales.Customers | |
ORDER BY CASE | |
WHEN (region IS NULL) THEN 1 | |
WHEN region IS NOT NULL THEN 0 | |
END, region | |
SELECT * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP(3) shipcountry, AVG(freight) AS avgfreight | |
FROM Sales.Orders | |
GROUP BY shipcountry,YEAR(orderdate) | |
HAVING YEAR(orderdate)=2007 | |
order by avgfreight DESC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE TSQL2012; | |
SELECT orderid,SUM(qty*unitprice) as totalvalue | |
FROM Sales.OrderDetails | |
GROUP BY orderid | |
HAVING (SUM(qty*unitprice)) >10000 | |
ORDER BY totalvalue DESC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT orderid, orderdate, custid, empid | |
FROM Sales.Orders | |
WHERE EOMONTH(orderdate)=orderdate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select orderid, orderdate, custid, empid | |
FROM Sales.Orders | |
WHERE YEAR(orderdate)=2007 AND MONTH(orderdate)=6 |
NewerOlder