T-SQL

Alter SQL Server stored procedure

How to alter a SQL Server stored procedure already in a Microsoft database ? Simply use the alter procedure command instead of the create command to modify an existing SQL procedure. In this example let’s add the grouping on months and employees to sum up and group the data. Let’s also add a sorting option to have the Sales figures by descending amounts. How

T-SQL

Manage SQL Server tables

How to manage SQL Server tables? Here is a list of syntaxes for SQL Server tables. SQL tables in general are the most central type of object that exists in a database. As a file is the basic building block of any operating system. Keep this as a bookmark for creating a table easily. Manage SQL Server tables with T-SQL scripts Here is how

SQL Server errors

Cannot find the object because it does not exist

How to avoid the SQL Server Truncate Table Error Cannot find the object? In SQL Server, to clear the full content of a table, the fastest way is to run a truncate Table query. The Truncate is different from the Delete From query. Because it empties all the lines in the table without a Where clause, it’s a database definition language SQL operation. In

T-SQL

Modify a SQL Server function with alter function

How to modify a SQL Server function with Alter Function ? How to update the code of an SQL Server function without deleting it? The solution is to update its definition using the SQL Server Alter Function command. The query updates the function already created in the database. This new code returns not only the customer name, but also the customer city, separated with