Tag sql server management studio

SQL BETWEEN Keyword

BETWEEN The BETWEEN command is used to select values within a given range. The values can be numbers, text, or dates. The BETWEEN command is inclusive: begin and end values are included. The following SQL statement selects all products with…

SQL BACKUP DATABASE Keyword

BACKUP DATABASE The BACKUP DATABASE command is used in SQL Server to create a full back up of an existing SQL database. The following SQL statement creates a full back up of the existing database “testDB” to the D disk:

SQL ASC Keyword

ASC The ASC command is used to sort the data returned in ascending order. The following SQL statement selects all the columns from the “Customers” table, sorted by the “CustomerName” column:

SQL AS Keyword

AS The AS command is used to rename a column or table with an alias. An alias only exists for the duration of the query. Alias for Columns The following SQL statement creates two aliases, one for the CustomerID column…

SQL ANY Keyword

ANY The ANY command returns true if any of the subquery values meet the condition. The following SQL statement returns TRUE and lists the productnames if it finds ANY records in the OrderDetails table where quantity = 10:

SQL AND Keyword

AND The AND command is used with WHERE to only include rows where both conditions is true. The following SQL statement selects all fields from “Customers” where country is “Germany” AND city is “Berlin”:

SQL ALTER TABLE Keyword

ALTER TABLE The ALTER TABLE command adds, deletes, or modifies columns in a table. The ALTER TABLE command also adds and deletes various constraints in a table. The following SQL adds an “Email” column to the “Customers” table:

SQL ALTER COLUMN Keyword

ALTER COLUMN The ALTER COLUMN command is used to change the data type of a column in a table. The following SQL changes the data type of the column named “BirthDate” in the “Employees” table to type year:

SQL ALTER Keyword

ALTER TABLE The ALTER TABLE command adds, deletes, or modifies columns in a table. The ALTER TABLE command also adds and deletes various constraints in a table. The following SQL adds an “Email” column to the “Customers” table: