Knowee
Questions
Features
Study Tools

Write a query to create 'building' table.Hint: Refer the schema diagram for the field names and its data type of the table.Note:This ‘building’ table got foreign key reference. You no need to create building_type table. It is already created for you.Field name and data type must be followed as such given in the schema diagram.There should not be any spelling mistakes in the field namesIf you specified wrong field name or missed any field name while creating the table, but if there is no syntax error then obviously the table will get created but it will not get Accepted.In this case, drop the table and recreate it again with correct field names and get it Accepted.

Question

Write a query to create 'building' table.Hint: Refer the schema diagram for the field names and its data type of the table.Note:This ‘building’ table got foreign key reference. You no need to create building_type table. It is already created for you.Field name and data type must be followed as such given in the schema diagram.There should not be any spelling mistakes in the field namesIf you specified wrong field name or missed any field name while creating the table, but if there is no syntax error then obviously the table will get created but it will not get Accepted.In this case, drop the table and recreate it again with correct field names and get it Accepted.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The language of the text is English. Here is the SQL query to create the 'building' table:

CREATE TABLE building (
    building_id INT PRIMARY KEY,
    building_name VARCHAR(255),
    building_type_id INT,
    FOREIGN KEY (building_type_id) REFERENCES building_type(building_type_id)
);

This query creates a table named 'building' with three fields: 'building_id', 'building_name', and 'building_type_id'. The 'building_id' field is the primary key of the table. The 'building_type_id' field is a foreign key that references the 'building_type_id' field in the 'building_type' table.

If you made a mistake and need to drop the table, you can use the following query:

DROP TABLE building;

Then you can recreate the table with the correct field names.

This problem has been solved

Similar Questions

Write a query to create 'building' table.

Write a query to insert any 3 records into the 'building' table.Note:1. This ‘building’ table got foreign key reference. Already building_type table got below records in it. You no need to insert any new records into building_type table. Please insert records into building table alone by referring the below building_type_id.2. You can provide any values to the building id, owner_name, address, contact_number and email_address column. But for the building_type_id column you must refer to the values specified in the building_type id column only.3. Insert only 3 records into the building table

Field name and data type must be followed as such given in the schema diagram.There should not be any spelling mistakes in the field namesIf you specified wrong field name or missed any field name while creating the table, but if there is no syntax error then obviously the table will get created but it will not get Accepted.In this case, drop the table and recreate it again with correct field names and get it Accepted.

Write a query to create a table named  'station'.Hint: Refer the schema diagram for the field names and its data type of the table.Note:Field name and data type must be followed as such given in the schema diagram.There should not be any spelling mistakes in the field namesIf you specified wrong field name or missed any field name while creating the table, but if there is no syntax error then obviously the table will get created but it will not get Accepted.In this case, drop the table and recreate it again with correct field names and get it Accepted.

Write a query to insert any 3 records into the 'building' table.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.