SQL interview Questions with 100% correct answers
Q. How do you select all records from the table? - Select * from table_name; Q. What is a join? - Join is a process of retrieve pieces of data from different sets (tables) and returns them to the user or program as one "joined" collection of data. How do you add record to a table? - INSERT into table_name VALUES ('ALEX', 33 , 'M'); Q. How do you add a column to a table? - ALTER TABLE Department ADD (AGE, NUMBER); Q. How do you change value of the field? - A. UPDATE EMP_table set number = 200 where item_munber = 'CD'; update name_table set status = 'enable' where phone = ''; update SERVICE_table set REQUEST_DATE = to_date (':29', 'yyyy-mm-dd hh24:MM') where phone = ''; What does COMMIT do? - Saving all changes made by DML statements What is a primary key? - The column (columns) that has completely unique data throughout the table is known as the primary key field. What are foreign keys? - Foreign key field is a field that links one table to another table's primary or foreign key. What is the main role of a primary key in a table? - The main role of a primary key in a data table is to maintain the internal integrity of a data table. Can a table have more than one foreign key defined? - A table can have any number of foreign keys defined. It can have only one primary key defined. Q. List all the possible values that can be stored in a BOOLEAN data field. - There are only two
Written for
- Institution
- AWS Database speciality
- Course
- AWS Database speciality
Document information
- Uploaded on
- December 25, 2023
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
sql interview questions with 100 correct answers