SQL Server Views

How to modify a SQL Server view?

How to modify an existing T-SQL view ? To develop a SQL Server database or more generally an application, create a database and tables is mandatory. The views are also very useful because they allow you to adjust a specific number of rows and columns without changing the table structure.

SQL Server Views

How to create a SQL Server view?

How to create a SQL Server view to display specific columns from an existing table? Consider a view as a virtual table defined by a SQL query. It’s a set of columns and rows from a table. A user defined view is a view created by a SQL Server developer.

SQL Server Views

How to delete a SQL Server view?

How to delete a SQL Server view from the database? For a SQL developer it’s a good practice to have a clean database and remove the unused or useless code. Unlike the tables, the views can be deleted from the database using a SQL command. How to delete a SQL

No Picture
SQL Server Functions

How to delete a SQL Server function?

How to delete a SQL Server function? This SQL command delete the SQL Server function. However, it does not check if the function exists. How to delete a SQL Server function? Use this T-SQL code to delete the function from the database, the function will be permanently deleted. To avoid errors in

SQL Server Functions

How to call a SQL Server function?

How to call a SQL Server user defined function? The SQL syntax to call a function is different from the call to a stored procedure. Use SQL Server function the same way you select data from a table. How to call a SQL Server function? A SQL Server user-defined function

SQL Server Tables

How to delete a SQL Server table?

How to delete a SQL Server table? How to drop a table without checking if the table exists? Assume the object is already in the database. How to delete a SQL Server table from the database with a query? Here is a SQL script to create a SQL Server table.

SQL Server

How to modify a SQL Server function?

How to modify a SQL Server 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

SQL Server

How to create a SQL Server function?

How to create a SQL Server function? For example, the SQL Server function below takes the customer number as a parameter and returns the customer name. Indeed, the function stores the customer name in the Customer Name variable, and it returns it as a result. How to create a SQL

SQL Server

Remove SQL Server new line

How to remove SQL Server new line? This post propose a simple SQL Server query to process a string variable and remove the new line character. Technically we replace the new line by nothing. The SQL Server code for a new line is CHAR(13)+CHAR(10).     You want to remove it to