DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   
Stats
Total Count : 20
Resources Publish New Article  
 
mssql-scripter : generate SQL Server DML and DDL Scripts on Linux, macOS and Windows
Ashok Nalam
By: Ashok Nalam | 04 Jan 2018 | SQL Server | Views: 5517 | Comments: 3 | Tags:GitHub  open source  SQL Server 
SQL Operations Studio (sqlopsstuidio) is ready to download and install
Ashok Nalam
By: Ashok Nalam | 20 Dec 2017 | SQL Server | Views: 5352 | Comments: 2 | Tags:GitHub  open source  SQL Server 
mssql-cli, Command-line client for SQL Server with auto-completion and syntax highlighting
Ashok Nalam
By: Ashok Nalam | 14 Dec 2017 | SQL Server | Views: 5840 | Comments: 0 | Tags:open source  SQL Server  tool 
SQL Server 2017 Community Technology Preview 2.0 is available
Ashok Nalam
By: Ashok Nalam | 20 Apr 2017 | SQL Server | Views: 6151 | Comments: 0 | Tags:SQL Server  SQL Server 2017 
Microsoft SQL Server 2016 Service Pack 1 is released
Ashok Nalam
By: Ashok Nalam | 20 Nov 2016 | SQL Server | Views: 6373 | Comments: 0 | Tags:service pack  SQL Server 2016 
Set Default Database with SQL Server Management Studio
Ashok Nalam
By: Ashok Nalam | 27 Mar 2014 | SQL Server | Views: 9750 | Comments: 0 | Tags:database  SQL Server  tsql  user 
SQL Server: Find database mdf and ldf physical file locations using T-SQL
Ashok Nalam
By: Ashok Nalam | 14 Feb 2014 | SQL Server | Views: 9553 | Comments: 2 | Tags:database  file  tsql 
CONCAT() string function in SQL Server 2012
Ashok Nalam
Article shows how to use CONCAT() function which is introduced with SQL Server 2012 version and also covers different features of it.
By: Ashok Nalam | 10 Feb 2014 | SQL Server | Views: 6035 | Comments: 0 | Tags:SQL Server 2012  string  tsql 
Cannot connect to SQL Server. Login failed for user 'sa'. (Microsoft SQL Server, Error: 18456)
Ashok Nalam
By: Ashok Nalam | 17 Jan 2014 | SQL Server | Views: 7566 | Comments: 0 | Tags:error 
SET IDENTITY_INSERT for Table Variable
Ashok Nalam
By: Ashok Nalam | 09 Jan 2014 | SQL Server | Views: 15301 | Comments: 2 | Tags:identity  table  variable 
The file "AdventureWorksDW2012_Data.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Ashok Nalam
By: Ashok Nalam | 25 Nov 2013 | SQL Server | Views: 10284 | Comments: 2 | Tags:database  error  SQL Server 
install AdventureWorksDW Database on SQL Server2012
Ashok Nalam
By: Ashok Nalam | 25 Nov 2013 | SQL Server | Views: 17291 | Comments: 2 | Tags:database  SQL Server 2012 
EOMONTH() function in SQL Server 2012
Ashok Nalam
EOMONTH is new built-in Date and Time function which is introduced with SQL Server 2012.We will see EOMONTH usage with examples and EOMONTH() Equivalent in SQL Server 2008 R2 and below.
By: Ashok Nalam | 24 Sep 2013 | SQL Server | Views: 11932 | Comments: 2 | Tags:SQL Server 2012 
Rollback transaction behavior on table variable
Ashok Nalam
By: Ashok Nalam | 24 Jul 2013 | SQL Server | Views: 26007 | Comments: 0 | Tags:table  transactions  tsql 
Insert data to table with only one IDENTITY column exists in table
Ashok Nalam
If we have a table with only one column which is marked as IDENTITY column, then how we will insert data to table? This scenario will be very rare. But we will see how to insert data to table with only one IDENTITY column exists.
By: Ashok Nalam | 24 May 2013 | SQL Server | Views: 8224 | Comments: 0 | Tags:identity  insert  table 
Bulk import in SQL Server 2008 from CSV file
Maram Kiran Kumar
By: Maram Kiran Kumar | 15 Apr 2013 | SQL Server | Views: 6027 | Comments: 0 | Tags:Bulk import  CSV file  SQL Server 
Difference between count(*) and count(column_name)
Ashok Nalam
We might assume that count(*) and count(column_name) will return same result count. But NO, in case of column holds any null values.

Count (*) – returns all values (including nulls and duplicates)
Count (Column_Name) – returns all Non-NULL values(including duplicates)

In the below script we will see how it works. So that it will be easy for us to understand.
create table #tempTable(Name char(1))
insert into #tempTable values("A")
insert into #tempTable values("B")
insert into #tempTable values(Null)
insert into #tempTable values("C")
insert into #tempTable values(Null)
insert into #tempTable values("C")
select COUNT(*) from #tempTable
select COUNT(Name) from #tempTable
drop table #tempTable
Output: 6 and 4
The table #temptable has total 6 rows. Count(*) returns all the rows including null/duplicates but where as count(name) returns only 4 rows which includes duplicates("C") but not null values.

If you want to remove the duplicates from count(Name) then use distinct keyword in it.
select COUNT(distinct Name) from #tempTable –-returns 3
By: Ashok Nalam | 28 Dec 2012 | SQL Server | Views: 10918 | Comments: 0 | Tags:difference  tsql 
Looping through rows without cursors in Sql server using while loop
Ashok Nalam
In this snippet we will see how to iterating through the table rows data with out using cursor in SQL server.
By: Ashok Nalam | 22 Dec 2012 | SQL Server | Views: 22148 | Comments: 0 | Tags:cursor  tsql 
GET/Remove the last character from a string in SQL Server
Ashok Nalam
We will see how to get and remove last character from a string in sql server.
By: Ashok Nalam | 14 Dec 2012 | SQL Server | Views: 21172 | Comments: 0 | Tags:string  tsql 
Does UNIQUE KEY supports more than one NULL Value?
Ashok Nalam

No. In SQL server we can insert only one NULL value to column which has UNIQUE KEY constraint.

Example:

CREATE TABLE SamepleUnique
(
Id INT PRIMARY KEY,
Name varchar(20) UNIQUE
)
INSERT INTO SamepleUnique VALUES(1,'Ram')
INSERT INTO SamepleUnique VALUES(2,'Krish')
INSERT INTO SamepleUnique VALUES(3,Null)
INSERT INTO SamepleUnique VALUES(4,Null) --Error as Violation of UNIQUE KEY constraint 'UQ__SamepleU__737584F603317E3D'. Cannot insert duplicate key in object 'dbo.SamepleUnique'.
--The statement has been terminated.


By: Ashok Nalam | 12 Dec 2012 | SQL Server | Views: 6310 | Comments: 1 | Tags:Constraints  unique key 
 
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys