Here is a short practice for Microsoft SQL Server:
- Open SQL Server Management Studio and connect to your SQL Server instance.
- Create a new database called “PracticeDB”.
- Create a new table called “employees” with the following columns:
- “id” (integer)
- “first_name” (varchar(50))
- “last_name” (varchar(50))
- “position” (varchar(100))
- “salary” (decimal(10,2))
- Insert the following data into the “employees” table:
- (1, ‘John’, ‘Doe’, ‘Manager’, 80000)
- (2, ‘Jane’, ‘Doe’, ‘Developer’, 75000)
- (3, ‘Jim’, ‘Smith’, ‘Tester’, 65000)
- (4, ‘Amy’, ‘Johnson’, ‘Designer’, 70000)
- Retrieve all data from the “employees” table and order the results by salary in ascending order.
- Update the position of employee with id 3 to ‘QA Engineer’.
- Delete the employee with id 4 from the “employees” table.
- Retrieve the first name and last name of all employees who have a salary greater than $70,000.
By following these steps, you will practice basic SQL commands such as SELECT, INSERT, UPDATE, and DELETE and gain experience with managing data in Microsoft SQL Server.