Tag sql server management studio

SQL ALTER TABLE Statement

SQL ALTER TABLE Statement The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. ALTER TABLE –…

SQL DROP TABLE Statement

The SQL DROP TABLE Statement The DROP TABLE statement is used to drop an existing table in a database. Syntax DROP TABLE table_name; Note: Be careful before dropping a table. Deleting a table will result in loss of complete information…

SQL CREATE TABLE Statement

The SQL CREATE TABLE Statement The CREATE TABLE statement is used to create a new table in a database. Syntax CREATE TABLE table_name (     column1 datatype,     column2 datatype,     column3 datatype,    …. ); The column parameters specify…

SQL BACKUP DATABASE for SQL Server

The SQL BACKUP DATABASE Statement The BACKUP DATABASE statement is used in SQL Server to create a full back up of an existing SQL database. Syntax BACKUP DATABASE databasename TO DISK = ‘filepath’;

SQL DROP DATABASE Statement

The SQL DROP DATABASE Statement The DROP DATABASE statement is used to drop an existing SQL database. Syntax DROP DATABASE databasename; Note: Be careful before dropping a database. Deleting a database will result in loss of complete information stored in…

SQL Operators

SQL Arithmetic Operators Operator Description + Add Subtract * Multiply / Divide % Modulo

SQL Comments

SQL Comments Comments are used to explain sections of SQL statements, or to prevent execution of SQL statements. Note: Comments are not supported in Microsoft Access databases! Single Line Comments Single line comments start with –. Any text between —…

SQL Stored Procedures for SQL Server

What is a Stored Procedure? A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again. So if you have an SQL query that you write over and over…