Hamster
Search
Open menu
熟悉傳統數據庫概念及 SQL
1. In most databases, data are organized and stored in:
A.
plain text
B.
view
C.
table
D.
directory
2. Which of the following may be a valid SQL statement?
A.
select * from students where name='paul' and age>20;
B.
select students if name='paul' && age>20;
C.
get students where name='paul' and age>20;
D.
choose name, id from students if name='paul' && age>20;
3. Each record in the products table has a product ID, a product name and a price. How to calculate the numbers of products whose prices are greater than $100?
A.
select total(*) from products if price > 100;
B.
select sum(*) from products where price > 100;
C.
select total(*) from products for price > 100;
D.
select count(*) from products wehre price > 100;
4. Which of the following may be a valid SQL statement?
A.
choose name, id from students if name='paul' && age>20;
B.
select * from students where name='paul' and age>20;
C.
get students where name='paul' and age>20;
D.
select students if name='paul' && age>20;
5. Which of the following is a standard interactive and programming language for getting information from and updating a database?
A.
Dynamic Query Language (DQL)
B.
JAVA
C.
Structured Query Language (SQL)
D.
National Query Language (NQL)
6. Each record in the products table has a product ID, a product name and a price. How to double the prices of all products?
A.
update price = 2*price from products;
B.
update products by price = 2*price;
C.
update products price = 2*price;
D.
update products set price = 2*price;
7. Which of the following SQL statements is the correct one to copy rows from another tables?
A.
Insert into sales(item_id,name,price)select order_id,name,price from orders;
B.
Insert into sales(item_id,name,price)values (Select order_id,name,price from orders);
C.
Insert into sales(item_id,name,price)on select order_id,mane ,price from orders;
D.
Insert into sales(item_id,name,price)as select order_id,name,price from order;
8. Each record in the products table has a product ID and a product name. How to list the products sorted by their names?
A.
sort products by name
B.
select from products sorted by name
C.
select * from products order by name
D.
select products by name
9. Typically where is a database is stored?
A.
In memory.
B.
In the CPU.
C.
On a Hard disk.
D.
On a CDROM.
10. Which of the following is suitable to use index?
A.
Columns often be used in ORDER BY clause
B.
Table with many modifications but few actual queries
C.
Many duplicate rows
D.
Table with few rows