Select SQL Server database size
how can i query my sql server to only get the size of database? I used this : use “MY_DB” exec sp_spaceused I … Read more
how can i query my sql server to only get the size of database? I used this : use “MY_DB” exec sp_spaceused I … Read more
I installed Microsoft SQL Server 2008. When I start SQL Server Management Studio (SSMS), I get the Connect to Server login window with … Read more
I have a user-defined table type. I want to check it’s existence before editing in a patch using OBJECT_ID(name, type) function. What type … Read more
How to copy/append data from one table into another table with same schema in SQL Server? Edit: let’s say there is a query … Read more
I need to run a select statement that returns all rows where the value of a column is not distinct (e.g. EmailAddress). For … Read more
I want to create tables in SQL Server 2008, but I don’t know how to create composite primary key. How can I achieve … Read more
What are the advantages and disadvantages of using the nvarchar(max) vs. NText data types in SQL Server? I don’t need backward compatibility, so … Read more
I have a table and one of the columns is “Date” of type datetime. We decided to add a default constraint to that … Read more
I am using SQL Server Management Studio. I wish to save the results of a query to an excel file. I choose “save … Read more
A few examples to show, just incase: Inline Table Valued CREATE FUNCTION MyNS.GetUnshippedOrders() RETURNS TABLE AS RETURN SELECT a.SaleId, a.CustomerID, b.Qty FROM Sales.Sales … Read more