RE: Two more Qs Please...

RE: Two more Qs Please...

 

  

Q1)

Order of SQL:
create table hh (hh int not null, h int);

ALTER TABLE hh
ADD PRIMARY KEY (hh);

insert into hh values (5,5);

insert into hh values (1,1);

select * from hh;

HH H
----------- -----------
5 5
1 1

2 record(s) selected.


Q2) Unless this is a trick question, the answer is:

A. GRANT SELECT ON TABLE table1 TO user1


-----Original Message-----
From: sami dba [mailto:[Email Address Removed] Saturday, June 07, 2003 6:42 AM
To: [Email Address Removed] Two more Qs Please...


Q1)
Given a large table with the following sample data:
STAFF
ID LASTNAME
1 Jones
2 Smith
... ...
When issuing the query "SELECT * FROM staff", which of the following will
always describe the order of the rows in the result set?

A. An undetermined order

B. Sorted by primary key

C. The order in which rows were inserted into the table

D. Sorted by the ID column, then by the LASTNAME column

Q2)

A user creates the table TABLE1 with a referential constraint defined over
column COL1. Which of the following statements would explicitly give USER1
the ability to read rows from the table?

A. GRANT SELECT ON TABLE table1 TO user1

B. GRANT ACCESS ON TABLE table1 TO user1

C. GRANT REFERENCES TO user1 ON TABLE table1

D. GRANT UPDATE (col1) TO user1 ON TABLE table1




---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
DB2 & UDB email list listserv db2-l LazyDBA home page