Archive for the ‘SQL’ Category

When you try to restore a database there are some very tricky stuff you need to know. Advertisements

A list of widely used SQL settings Explained ANSI NULLS QUOTED_IDENTIFIER ARITHMABORT ANSI_DEFAULTS ANSI_WARNINGS DATEFIRST DATEFORMAT NOCOUNT NOEXEC IDENTITY_INSERT IMPLICITY_TRANSACTIONS LANGUAGE ANSI NULLS – Syntax SET ANSI_NULLS {ON | OFF} – Explanation The SQL-92 standard requires that an equals (=) or not equal to (<>) comparison against a null value evaluates to FALSE. When SET […]

If you have an existing table (in my case products) This is the code you ll use to Alter a column and Add Identity to it. This is the Only Solution found on the NET. Even SSIS Cant to this procedure automatically. I guess this is caused due to constrains bound to a table. — […]

If you work with SQL Server on a regular basis, either writing custom queries, designing databases, or optimizing queries, this is a must see video as it covers a number of the enhancements to SQL Server 2008 including: – SQL Management Studio improvements including IntelliSense – New Data Types for just dates or times (no more […]

Lets consider a simple table called employee( emp_id, name, salary). Now, suppose that we need to create a gridview with paging. One option is to bring all the data from database and do the paging in client-side and another one is to do selective fetch. In both cases we can use a stored procedure that […]

1.Open the SQL Server express management studio 2.Connect to SQL Server using windows authentication 3.Right click the server name and choose properties 4.Go to security tab. Change server authentication to “SQL Server and Windows Authentication mode” 5.Click OK and restart SQL Server 6.Go to SQL Server studio management express 7.Expand the server and choose security […]