Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Duration: 30 mins
a) Synonym
b) Data Block
c) View
d) None of the above
3) When designing a database table, how do you avoid missing column values for
non-primary key columns
5) Which of the followings represents the correct syntax for creating a database
table?
a) Create table t_temp_table
(t_num number,
t_name varchar2(25))
b) Create table t_temp_table
(t_num number,
t_name varchar2)
c) Create table t_temp_table
(t_num number,
t_name varchar)
d) Create t_temp_table
(t_num number,
t_name varchar2(25))
Now we want to select only the distinct values from the column named "City" from
the table above. Which of the followings indicate the correct syntax:
Which of the following SQLs indicates the correct syntax for getting the firstname of
the persons who live in City Sandnes
Now we want to find the largest value of the "OrderPrice" column. Which of the
followings show the correct syntax:
Which of the followings indicate the correct syntax for getting to total orderprice for
all the customer orders:
a) select count(OrderPrice) from Orders;
b) select sum(OrderPrice) from Orders;
c) Select total(OrderPrice) from Orders;
d) Select sum(OrderPrice), orderDate from Orders group by OrderDate;
Which of the following indicate the correct syntax for getting the total OrderPrice for
customer Hansen.
Which of the following indicate the correct syntax for getting the total OrderPrice
date wise:
Which of the following indicate the correct syntax for updating the OrderDate to
todays date for all the customer whose OrderPrice is more than 1000:
a) update Orders set OrderDate = Todays date where OrderPrice is greater than
1000;
b) Update OrderDate = systemdate where orderPrice > 1000;
c) Update Orders set OrderDate = sysdate where OrderPrice > 1000;
d) Update Orders set OrderDate = sysdate for OrderPrice > 1000;
16) Write the syntax for creating a database table which has 3 columns, one for
Admission Date, one for Candidates name and one for their annual fee. You may
choose the name of the table as per your wish.
17) Write the syntax for creating a non-unique index on the table created in above
question on Admission date column.