Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount 101 Alex Paris 2012-10-05 150.5 102 James London 2012-10-05 270.3 103 Paul Paris 2012-10-05 120.8 104 Lawson Rome 2012-10-05 230.5 105 Kate Beijing 2012-10-05 30.2 1. Write a query to create a user table containing following columns. Whereas user_id as primary key. 2. Write a query to insert multiple records into user table. 3. Write a query to add two columns, country and currency in user table. 4. Write a query to update user table, set city as shanghai for a user having user_id 105. 5. Write a query to remove all records from user table. 6. Write a query to drop a column purchase _amount from user table. 7. Write a query to display name of user in descending order whose order purchase amount is in between 200 to 270. 8. Write a query to display name of user who belong to either Paris, London or CS Beijing. 9. Write query to display name of an employee who belong to paris. 10. Write a query to display unique city name form user table
Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount 101 Alex Paris 2012-10-05 150.5 102 James London 2012-10-05 270.3 103 Paul Paris 2012-10-05 120.8 104 Lawson Rome 2012-10-05 230.5 105 Kate Beijing 2012-10-05 30.2 1. Write a query to create a user table containing following columns. Whereas user_id as primary key. 2. Write a query to insert multiple records into user table. 3. Write a query to add two columns, country and currency in user table. 4. Write a query to update user table, set city as shanghai for a user having user_id 105. 5. Write a query to remove all records from user table. 6. Write a query to drop a column purchase _amount from user table. 7. Write a query to display name of user in descending order whose order purchase amount is in between 200 to 270. 8. Write a query to display name of user who belong to either Paris, London or CS Beijing. 9. Write query to display name of an employee who belong to paris. 10. Write a query to display unique city name form user table
Step by step
Solved in 2 steps