Computer Science, asked by samuraiscorpion78, 2 months ago

Create a Database "dps" and in that database create a table named "stu" with the following columns:


RollNo , Name, Email.
Using alter command add Address column to the table.
Insert 3 rows of data in the table.
Display the data of the table.
Rename the table name from "stu" to "student"
Truncate the values of the table.

Answers

Answered by Equestriadash
7

Create database DPS;

Use DPS;

Create table Stu(RollNo int Primary key, Name varch‎ar(30), Email varch‎ar(30));

Alter table DPS add Address varch‎ar(40);

Insert into Stu values(2, 'Vanessa', '[email protected]', 'Sharjah');

Insert into Stu values(3, 'Veronica', '[email protected], 'Sharjah');

Insert into Stu values(6, 'Vivian', '[email protected]', 'Dubai');

Select * from Stu;

Alter table Stu rename to Student;

Truncate table Student;

  • Create database is used to create a database.
  • Use database is used to select a database.
  • Create table is used to create a table. When creating a table, the datatype of each column, along with their character limit and constraints (if any), need to be mentioned.
  • Alter table is used to make changes to the structure/definition of the table.
  • Insert into <table_name> values is used to insert data into the table.
  • Select is used to display/retrieve information from the table. The asterisk (*) represents all the data from the table.
  • Truncate table is used to truncate values from the table.
Answered by Itzpureindian
0

Answer:

the state of being immune from or insusceptible to a particular disease or the like. ... the condition that permits either natural or acquired resistance to disease. the ability of a cell to react immunologically in the presence of an antigen. exemption from any natural or usual liability.

Similar questions