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

T-SQL

Drop a SQL Server View

How to drop a SQL Server view with a T-SQL query? The DROP VIEW command allows you to simply delete an existing view with a T-SQL script run from SQL Server Management Studio (SSMS). The script below is an example of how to delete a view in a SQL database. That is, the view is deleted, but not the source tables to which it

T-SQL

Manage SQL Server user defined functions

How to manage SQL Server user defined functions ? SQL Server user-defined functions are very useful when starting T-SQL development. You need to use them very often so you have to learn the right syntaxes and avoid errors. At the beginning it can be tricky and frustrating because it’s binary, it work or don’t work, programming T-SQL functions is an exact science. There is

SQL Server Database Administration

Drop a SQL Server database with a script

How to delete a SQL Server database with a script? And delete all associated files? These files are the .mdf, .ndf, .ldf files and also the .bak backup files. Use the SQL Server Drop database command as below. With a check beforehand to avoid errors. It runs the command only if the SQL Server database exists on the given server and instance. Create a