Question 1: Provide the create table syntax to Create a Table Employee whose details are as below.

Employee(EmployeeID, LastName, FirstName, Address, DateHired)] Ans: create table Employee(EmployeeID number(5) constraint empid_pk primary key, LastName varchar2(15), FirstName varchar2(20),address varchar2(15), date date) Question 2: Provide the INSERT query to be used in Employee Table to fill the Details. Ans: Insert into Employee values(1001,’selvam’,’ramya’,’ramsaraswathi nagar’,’12-jan-2011’); Question 3: When we give SELECT * FROM EMPLOYEE .How does it Respond? Ans: To display all columns that have stored by the user in the table ‘employee’ we can use select * from employee. Only one record has been stored in the table ‘employee’ which will displayed. Question 4: Create a Table CLIENT whose details are as below. Client(ClientID, LastName, FirstName, Balance, EmployeeID) Ans: create table Client(ClientID number(5) constraint cli_pk primary key,LastName varchar2(20),FirstName varchar2(20),Balance number(15),EmpID number(5) constraint emp_ID_fk references Employee(EmployeeID)) Question 5: Provide the INSERT query to be used in CLIENT Table to fill the Details. Ans : Insert into Client(ClientID, LastName, FirstName, Balance, EmployeeID) values(‘&value1’,’&value2’,’&value3’,’&value4’,’&value5’) /*‘&value1’,’&value2’ these are used get the dynamic values i.e., getting values at run time in any numbers.*/ Question 6: When we give SELECT * FROM CLIENT .How does it Respond? Ans: It will return all the records has been stored under the table client. Question 7: Choose the correct answer. The SQL command to create a table is:

Date and Time : It stores date and time information. 3. Binary : It stores data in strict binary (0 or 1) representation. is not an SQL statement ans : b.a. It is used specially for currency values. Alter Table c. 2. deletes the table structure only b. Create Table ans : d. includingtables? Ans: Data Definition Language Question 11: What operator performs pattern matching? Ans: LIKE operator.(if we want to list employees whose name start with the letter . 4. deletes the table structure along with the table data Question 9: What are the different data types available in SQL server? Ans: 1. Create table Question 8: Choose the correct answer. Define Table d. Character : It supports character based values of varying lengths. Question 10: Which is the subset of SQL commands used to manipulate Oracle Database structures. works whether or not referential integrity constraints would be violated d. Make Table b. The DROP TABLE statement: a. 5. deletes the table structure along with the table data c. Numeric : Stores numeric values.. Monetary : It stores numeric values with decimal places.

and then executes it? Ans: RUN Question 16: What are the wildcards used for pattern matching? Ans : ’_’ and ‘%’ Question 17: State whether true or false.insert.update Question 20: What command is used to get back the privileges offered by the GRANT command? Ans: revoke . <>.R we have to use like ‘r%’) Question 12: What operator tests column for the absence of data? Ans: IS NULL operator Question 13: Which command executes the contents of a specified file? Ans: START Question 14: What is the parameter substitution symbol used with INSERT INTO command? Ans: ’&’ operator Question 15: Which command displays the SQL command in the SQL buffer. ^= all denote the same operation.update. Ans : True Question 19: What are the privileges that can be granted on a table by a user to others? Ans: select. !=.all. EXISTS.execute.alter. ANY are operators in SQL. delete. Ans : true Question 18: State whether true or false. SOME.

DELETE command In which where clause will be used while in TRUNCATE it cannot be used Question 24: What command is used to create a table by copying the structure of another table? Ans: create table new as select * from existing where x=y. . DELETE command can be get back while TRUNCATE deleted the table permanently. 2. 3.DELETE command is DML command and TRUNCATE is a DDL command. Question 22: Which system table contains information on constraints on all the tables created? Ans: USER_CONSTRAINTS. USER_TAB_PRIVS_RECD . Here If the where clause condition gets satisfied then it will display all the records. Question 23: What is the difference between TRUNCATE and DELETE commands? Ans: 1.Question 21: Which system tables contain information on privileges granted and privileges obtained? Ans: USER_TAB_PRIVS_MADE.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.