4.SESSION_USER
5.CREATE TRIGGER trgAfterInsert ON[DR].[dbo].[Sales]
FOR INSERT
AS
insert into [Main].[dbo].[Sales_Audit]
(Customer, OrderNumber, OrderQty,Product)
SELECT Customer,OrderNumber, OrderQty,Product
FROM inserted;
6.You need to use Data Query Language (DQL).
7.The other Views that reference that name will use the table.
8.CEILING
9.WITH cteTotalSales (SalesPersonID, SalesTotal)
AS
( SELECT SalesPersonID, SUM(SubTotal) as SalesTotal
FROM Sales.SalesOrderHeader
WHERE SalesPersonID IS NOT NULL
GROUP BY SalesPersonID )
10.When you are working with hierarchical data
11.You will receive an error: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
12.ELECT EmployeeName, Department
FROM Employee
FULL OUTER JOIN Department
ON Employee.DepartmentID=Department.DepartmentID
ORDER BY EmployeeName
13.AVG(DISTINCT UnitPrice)
14.BEGIN TRANSACTION
... statements here ...
COMMIT TRANSACTION
15.SAVEPOINT
16.Select Customerid, Sum(SalesTotal)
from Customers
Group by CustomerId
Having Sum(SalesTotal) > 5000
17.COALESCE(@DepartmentName,'')
18.SELECT SUBSTRING(CityPrice, (POSITION('_' IN CityPrice ) +1) ,5)
19.Use Dense_Rank in place of Rank
20.They do not store data and are searchable.
21.Select Name, CreateDate, AccountId
From Account1 Where State = 'IN'
Union
Select Name, CreateDate
From Account2 Where State = 'IN'
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}