InterviewSolution
| 1. |
Tables |
||||||||
|
Answer» All data in the database are organized efficiently in the form of tables. A database can be formed from a collection of multiple tables, where each table would be used for storing a particular kind of data and the table by themselves would be linked with each other by using some relations. Example:
The above example is for a table of students and stores their Name, Phone, and Class as data. The ID is assigned to each student to uniquely identify each student and using this ID, we can relate data from this table to other tables. SQL-Create Table:We use the CREATE command to create a table. The table in the above example can be created with the following code: CREATE TABLE student(ID INT NOT NULL, Name varchar(25), Phone varchar(12), Class INT ); SQL-Delete Table: To delete a table from a database, we use the DROP command. DROP TABLE student; |
|||||||||