Questions
Which of the following best describes Oracle?
- Spreadsheet
- Relational Database Management System
- Database Management System
- Object Relational Database Management System
Which of the following SQL keywords is used to resize a column definition?
- Alter table
- Resize
- Drop
- Change Size
SQL stands for _____.
- Structured Question Lanaguage
- Strurctured Queried Language
- Structured Query Language
- Structured Queries Language
The Like operator uses some special symbols called wildcards for pattern matching. Which of the following are valid wildcard characters in SQL?
- & and *
- % and *
- % and _ (underscore)
- $ and _ (underscore)
Which of the following SQL statements can be used to display the list of available tables?
- Select * from tables
- Select * from tab
- Select * from tabs
- Select all from tab
Which of the following statements is used to undo any accidental changes in a table?
- Undo
- Recover
- Rollback
- Recall
A user in Oracle must have which of the following privileges in order to create objects like tables, views, etc.?
- Connect
- Admin
- Create User
- Resource
The temporary name of a table or a column is known as _____.
- view
- object
- synonym
- alias
The Truncate Table statement when issued, _____.
- deletes all the records from a table
- deletes all the rows along with the table
- deletes the structure of the table leaving rows intact
- deletes only the null rows of a table
We can modify the data type of a column which already has data only _____.
- when the data type of the column is varchar
- when the column is empty
- Anytime we want, there are no restrictions
- If we are logged in as SYSTEM
A Select/Delete/Update statement that does not have a where clause will _____.
- affect no record
- affect all the records
- return an error
- affect only the first record
All the values in 'where in' clause must be separated by a _____.
- colon (:)
- period (.)
- comma (,)
- space
The ___ statement is used to save changes made to a table.
- Save All
- Save Now
- Commit
- Commits
The and operator is written as __ in SQL.
- &&
- and
- &
- *
How can we select all the records from a table named company list where the value of the column company is IBM?
- Select [all] from company list where company = IBM
- Select * from company list where company = IBM
- Select * from company list where company = ibm
- Select * * from company list where company = IBM
The statement to return all the records from a table named books sorted in descending by the column author is _____.
- select * from books order by author
- select * from books by order desc
- select * from books order by author desc
- select * from books sort by author desc
How can we count the number of records in the sample table?
- Select column(*) from sample
- Select count() from sample
- Select column() from sample
- Select count(*) from sample
Which of the following is a valid statement to select all the records from a table named city where the value of the column cityname starts with an 'A'?
- SELECT * FROM city WHERE cityname = '%A%'
- SELECT * FROM city WHERE cityname = 'A'
- SELECT * FROM city WHERE cityname LIKE '%A'
- SELECT * FROM city WHERE cityname LIKE 'A%'
Which of the following statements creates a copy of the table named source with the name target?
- Create table target (Select * from source)
- Create table target from source
- Create table target from source as select * from source
- Create table target as select * from source
Assume that in a table named Papers, there is a column named Name. Which of the following SQL statements can be used to set its value to NULL?
- Update table papers set name=null
- Update papers set name=null
- Update papers set name is null
- Update name set papers=null
Which of the following is a valid statement to insert a new record in the doctor table?
- Insert into doctor values('Sam','Twain')
- Insert ('Sam','Twain') into doctors
- Insert values('Sam','Twain') into doctors
- Insert doctor values('Sam','Twain')
Which SQL statement is used to extract data from a table?
- Select
- Display
- Get
- Describe
Which of the following keywords is different from others in terms of functionality?
- Insert
- Delete
- Alter
- Update
Which of the following SQL commands is used to delete data from a table?
- Remove
- Truncate
- Delete
- Drop
Which SQL statement is used to return only different (non duplicate) values in a select statement?
- Distinct
- Primary key
- Unique
- Different