Data Definition Language [RDBMS > Data Definition Language] | Accenture TFA Training Pre-Learning Modules

2

Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the Hands-On Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!


1. Add a column in Registration Table

Path: RDBMS/Data Definition Language/Add a column in Registration Table/Add a column in Registration Table/sample.sql

alter table registration add DOC Date;

ALTER TABLE REGISTRATION ADD CONSTRAINT CHKGRTR CHECK(DOC>DOJ); 


2. Add a column in Student Table

Path: RDBMS/Data Definition Language/Add a column in Student Table/Add a column in Student Table/sample.sql

alter table student add Age Number(2);


3. Add a constraint to Course Table

Path: RDBMS/Data Definition Language/Add a constraint to Course Table/Add a constraint to Course Table/sample.sql

alter table course ADD CONSTRAINT CHK_FEES Check(fees>0);


4. Alter - Add CHECK constraint to Mobile_Master

Path: RDBMS/Data Definition Language/Alter - Add CHECK constraint to Mobile_Master/model.sql

ALTER TABLE MOBILE_MASTER ADD CONSTRAINT CHK_WARRANTY CHECK(WARRANTY_IN_YEARS>0);


5. Alter - Add Check constraint to Course Table

Path: RDBMS/Data Definition Language/Alter - Add Check constraint to Course Table/sample.sql

alter table course ADD CONSTRAINT CHK_FEES Check(fees>0);


6. Alter - Add Referential Integrity Constraint/

Path: RDBMS/Data Definition Language/Alter - Add Referential Integrity Constraint/sample.sql

alter table PointofInterest add constraint FK foreign key (townID) references Town(townID);


7. Alter - Add a column age

Path: RDBMS/Data Definition Language/Alter - Add a column age/model.sql

Alter table Customer_Info add Age number(10);


8. Alter - Establish Referential Integrity Constraint

Path: RDBMS/Data Definition Language/Alter - Establish Referential Integrity Constraint/model.sql

alter table Sales_info add constraint FK_KEY foreign key (Customer_ID) REFERENCES Customer_info(Customer_ID);


9. Alter - removing a column in Mobile Specification

Path: RDBMS/Data Definition Language/Alter - removing a column in Mobile Specification/model.sql

alter table Mobile_Specification drop column Weight;


10. Alter -Modify the field type

Path: RDBMS/Data Definition Language/Alter -Modify the field type/sample.sql

ALTER TABLE MOBILE_SPECIFICATION MODIFY  WEIGHT NUMBER(10);


11. Alter table buses  remove column

Path: RDBMS/Data Definition Language/Alter table buses  remove column/ddl5.sql

alter table buses drop column Ac_Available;


12. Alter table payments Rename column

Path: RDBMS/Data Definition Language/Alter table payments Rename column/alter1.sql

alter table payments rename column bd_id to booking_id;


13. Alter-Add a new column

Path: RDBMS/Data Definition Language/Alter- Add a new column/ddl3.sql

alter table Buses add Ac_Available varchar2(10);


14. Alter- Modify the datatype

Path: RDBMS/Data Definition Language/Alter- Modify the datatype/ddl4.sql

alter table buses modify Ac_Available varchar(5);


15. Alter-Rename the field

Path: RDBMS/Data Definition Language/Alter-Rename the field/sample.sql

ALTER TABLE DISTRIBUTOR RENAME COLUMN DISTRIBUTOR_NAME TO DISTRIBUTOR_FULL_NAME;


If you have any queries, please feel free to ask on the comment section.

If you want MCQs and Hands-On solutions for any courses, Please feel free to ask on the comment section too.

Please share and support our page!

Post a Comment

2Comments
Post a Comment

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !

Join Telegram Channel

Join MNCAnswers To Get Instant Updates

Join Telegram Channel