Top "Sql-server" questions

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

How do I UPDATE from a SELECT in SQL Server?

In SQL Server, it is possible to insert rows into a table with an INSERT.. SELECT statement: INSERT INTO Table (…

sql sql-server tsql select
How do I perform an IF...THEN in an SQL SELECT?

How do I perform an IF...THEN in an SQL SELECT statement? For example: SELECT IF(Obsolete = 'N' OR InStock = …

sql sql-server tsql if-statement case
OR is not supported with CASE Statement in SQL Server

The OR operator in the WHEN clause of a CASE statement is not supported. How can I do this? CASE …

sql sql-server tsql case case-when
Add a column with a default value to an existing table in SQL Server

How can I add a column with a default value to an existing table in SQL Server 2000 / SQL Server 2005?

sql sql-server sql-server-2005 sql-server-2000
How to return only the Date from a SQL Server DateTime datatype

SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00:00:00.000 How can I get …

sql sql-server tsql date datetime
Inserting multiple rows in a single SQL query?

I have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and …

sql sql-server tsql insert
How to concatenate text from multiple rows into a single text string in SQL server?

Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this …

sql sql-server csv string-concatenation group-concat
Find all tables containing column with specified name - MS SQL Server

Is it possible to query for table names which contain columns being LIKE '%myName%' ?

sql sql-server tsql system-tables
Insert results of a stored procedure into a temporary table

How do I do a SELECT * INTO [temp table] FROM [stored procedure]? Not FROM [Table] and without defining [temp table]? …

sql sql-server sql-server-2005 tsql stored-procedures
SQL update from one Table to another based on a ID match

I have a database with account numbers and card numbers. I match these to a file to update any card …

sql sql-server select join sql-update