Complete the code to select all columns from the table named 'employees' in the schema 'hr'.
SELECT * FROM hr.[1];The table 'employees' is in the 'hr' schema, so we use hr.employees to access it.
Complete the code to create a new schema named 'sales'.
CREATE SCHEMA [1];To create a schema named 'sales', use CREATE SCHEMA sales;.
Fix the error in the code to insert a row into the 'orders' table inside the 'sales' schema.
INSERT INTO [1].orders (order_id, amount) VALUES (1, 100);
The 'orders' table is in the 'sales' schema, so use sales.orders to insert data.
Fill both blanks to grant SELECT permission on the 'customers' table in the 'crm' schema to user 'alice'.
GRANT [1] ON [2].customers TO alice;
To allow 'alice' to read data, grant SELECT on the 'customers' table in the 'crm' schema.
Fill all three blanks to create a table named 'products' in the 'inventory' schema with columns 'id' (integer) and 'name' (text).
CREATE TABLE [1].[2] ([3]);
We create the 'products' table inside the 'inventory' schema with columns 'id' as integer and 'name' as text.