Welcome - SQL Database Reference Material - Learn sql, read an sql manual, follow an sql tutorial, or learn how to structure an SQL query!
http://www.sql.org/
We hope to provide a broad range of material so that we can be as useful to those who are just beginning to learn SQL as we are to experienced SQL fanatics. Our materials are currently limited to MySQL, PostgreSQL, Oracle, mSQL and Microsoft SQL, as well as materials that are applicable to any SQL server or relational database
http://www.sqlservercentral.com/
There are a number of reasons for poor storage performance, but measuring it and understanding what needs to be measured and monitored is always a useful exercise
Tricks to increase SQL Server query performance
http://searchsqlserver.techtarget.com/tip/Tricks-to-increase-SQL-Server-query-performance
ABOUT THE AUTHOR Denny Cherry has over a decade of experience managing SQL Server, including MySpace.com's over 175 million user installation, one of the largest in the world. The first is to create a stored procedure on the remote database and have it return a record set, being a subset of the remote tables, which is then loaded into a local temporary table
Understanding how SQL Server executes a query - CodeProject
http://www.codeproject.com/Articles/630346/Understanding-how-SQL-Server-executes-a-query
The operator at the root of the tree will in turn call the same operation on each of its children operators, and these in turn call the same operations on their child operators and so on. To understand how DDL statements work, is important to understand that SQL Server stores all the metadata about any object in the database in internal system tables.An insert into the system tables that describes the existing tables will result in a new table being recognized by SQL Server
SQL Server: INSERT Statement
http://www.techonthenet.com/sql_server/insert.php
Syntax In its simplest form, the syntax for the INSERT statement when inserting a single record using the VALUES keyword in SQL Server (Transact-SQL) is: INSERT INTO table (column1, column2, ... The syntax for the SQL Server INSERT statement when inserting a single record using the DEFAULT VALUES keyword is: INSERT INTO table (column1, column2, ..
SQL Server Query Execution Plan Analysis - SQL Server Performance
http://www.sql-server-performance.com/2006/query-execution-plan-analysis/
Keep the following in mind when viewing a graphical execution plan: In very complex query plans, the plan is divided into many parts, with each part listed one on top of the other on the screen. If you move your cursor over any of the arrows connecting the steps and sub-steps, you see a pop-up window showing how many records are being moved from one step or sub-step to another step or sub-step
http://sqlmag.com/t-sql/sql-server-interval-queries
Consider the following list sorted by X, Y: X, Y 1, 10 1, 20 1, 40 1, 50 2, 20 2, 30 2, 50 3, 20 3, 40 3, 50 3, 50 3, 60 4, 10 4, 10 4, 50 4, 60 Suppose this sorted list represents data in the leaf level of a B-tree index. Starting with SQL Server 2008, you can represent spatial intervals using the spatial data types GEOMETRY and GEOGRAPHY and operate on those types with methods
Use CASE statement to check if column exists in table - SQL Server - Stack Overflow
http://stackoverflow.com/questions/16687579/use-case-statement-to-check-if-column-exists-in-table-sql-server
I've got as far as using a CASE statement like the following: SELECT cast(case WHEN EXISTS (select ModifiedByUser from Tags) THEN 0 ELSE 1 END as bit) But if the ModifiedByUser doesn't exist then I'm getting an invalid column name, instead of the return value
http://blog.sqlauthority.com/2008/08/28/sql-server-2008-introduction-to-merge-statement-one-statement-for-insert-update-delete/
In previous versions of SQL Server, we had to write separate statements to INSERT, UPDATE, or DELETE data based on certain conditions, but now, using MERGE statement we can include the logic of such data modifications in one statement that even checks when the data is matched then just update it and when unmatched then insert it. StudentID 2 is deleted as it is more than 250, 25 marks have been added to all records that exists i.e StudentID 1,3 and the records that did not exists i.e
http://blog.sqlauthority.com/2012/07/27/sql-server-query-to-get-unique-distinct-data-based-on-condition-eleminate-duplicate-data-from-resultset/
USE TempDB GO CREATE TABLE Table1 (ID INT, Product VARCHAR(100), Price INT, Color VARCHAR(100)) GO INSERT INTO Table1 SELECT 1, 'Toy', 100, 'Black' UNION ALL SELECT 2, 'Pen', 100, 'Black' UNION ALL SELECT 3, 'Pencil', 100, 'Blue' UNION ALL SELECT 4, 'Pencil', 100, 'Red' UNION ALL SELECT 5, 'Pencil', 200, 'Yellow' UNION ALL SELECT 6, 'Cup', 300, 'Orange' UNION ALL SELECT 7, 'Cup', 400, 'Brown' GO SELECT Product, Price, Color FROM Table1 GO Select the data without duplicate records as well select the data with maximum price. Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account
No comments:
Post a Comment