Top "Sql-server" questions

Microsoft SQL Server is a relational database management system (RDBMS).

Select statement to find duplicates on certain fields

Can you help me with SQL statements to find duplicates on multiple fields? For example, in pseudo code: select count(…

sql sql-server tsql sql-server-2008
Selecting data from two different servers in SQL Server

How can I select data in the same query from two different databases that are on two different servers in …

sql sql-server
Is there a Boolean data type in Microsoft SQL Server like there is in MySQL?

Is there a Boolean data type in Microsoft SQL Server like there is in MySQL? If so, what is the …

sql-server types boolean
Insert Data Into Temp Table with Query

I have an existing query that outputs current data, and I would like to insert it into a Temp table, …

sql sql-server ssms
Altering column size in SQL Server

How to change the column size of the salary column in the employee table from numeric(18,0) to numeric(22,5)

sql sql-server database tsql alter-table
When should I use cross apply over inner join?

What is the main purpose of using CROSS APPLY? I have read (vaguely, through posts on the Internet) that cross …

sql sql-server performance tsql cross-apply
Replacing NULL with 0 in a SQL server query

I have developed a query, and in the results for the first three columns I get NULL. How can I …

sql sql-server
Execute stored procedure with an Output parameter?

I have a stored procedure that I am trying to test. I am trying to test it through SQL Management …

sql-server stored-procedures
Nested select statement in SQL Server

Why doesn't the following work? SELECT name FROM (SELECT name FROM agentinformation) I guess my understanding of SQL is wrong, …

sql sql-server nested subquery querying
Best way to do nested case statement logic in SQL Server

I'm writing an SQL Query, where a few of the columns returned need to be calculated depending on quite a …

sql sql-server sql-server-2005 select nested