Showing posts with label SQL server 2012. Show all posts
Showing posts with label SQL server 2012. Show all posts

Monday, July 9, 2012

Difference between sqlserver 2008 and sqlserver 2012

Title: Difference between SQL Server 2008 and SQL server 2012

In previous articles i explained sqlserver 2008 concepts like Delete duplicate rows/columns from table,
Sql server 2012:
1.The SQL Server 2012 uses 48 bit precision for spatial
2.In SQL server 2012 has unlimited concurrent connections
3.By default it supports 15,000 partitions
4.Available new string functions CONCATE and FORMAT
5.Available new conversion  functions are PARSE ,TRY_CONVERT,TRY_PARSE
6.Microsoft.SqlServer.Dac and Microsoft.SqlServer.Dac.Extensions are introduced to perform  operations on Packages

Sql server 2008:
1.Maximum number concurrent connections to SQL Server 2008 is 32767
2.The SQL Server 2008 uses 27 bit precision for spatial
3.It can support only 1000 partitions
4.The CONCATE and FORMAT not available
5.Not available conversion function which are mentioned in SQL 2012



Thursday, November 24, 2011

how to select data from multiple tables in sql server

Title:How to retrieve the data from set of tables in SQL server

Description:
As per recent articles we have seen how to get the data from single table in SQL server.Now i want explain the same concept with multiple tables.The SQLserver has provided a Keyword which is used to get data from set of  tables using SQL query i:e"INTERSECT" keyword.Here i will show to get empid ,name from employee table by comparing with empid column in Department table

SELECT empid, name FROM Employee
WHERE empid IN
SELECT empid FROM Employee INTERSECT SELECT empid FROM Department) 
Here i have shown one more query to get the data from different table with out join
SELECT em.empid,em.name FROM Employee em,Department de WHERE em.empid=de.empid 

Tuesday, November 22, 2011

Changing column name and Datatype in Table in Sql

Title:How to Change column name and datatype in SQL server

Description:
This kind scenario will happen when we have to change the data base filed name or data type as per requirement.As per my application i need change the column type to Null.The SQL server provides a default stored procedure "sp_changename",which can make the things easier.Here i have used ALTER command To change the column name and data type in the table

Syntax:
Alter table TableName alter column ColumnName DataType NULL/NOT NULL
EXEC sp_changename        
@objname = ' TableName. OldColumnName’,
@newname = 'New ColumnName',
@objtype = 'COLUMN'

Example:
Alter table Organisation alter column name int null
EXEC sp_changename
@objname = 'Oraganisation.name',
@newname = 'name',
@objtype = 'COLUMN'

Bel