Given a table TABLE1 with 200,000 rows or so, it is necessary delete each row that has the attribute ATTR1 = "Y". The number of rows that meet this criterion is approximately 150,000. However, the maximum number of rows that can be deleted in any one transaction is 5000. Write a short SQL procedure to delete these rows, such that no more than 5000 rows is deleted in any one transaction.
What is the syntactical error in the following statement?
select * from BIG_TABLE
where InputTime = max(InputTime)
Given a database with the following tables
Table: parent Table: child
FieldA FieldB FieldA FieldC
1 A 1 X
2 B 3 Y
3 C 5 Z
i) How many rows would result from :
a) select * from parent, child
b) select * from parent, child where parent.FieldA = child.FieldA
c) select * from parent, child where parent.FieldA != child.FieldA
d) select * from parent, child where parent.FieldA *= child.FieldA
ii) How would you identify records in parent which cannot be joined to child using FieldA
How do you find out what database you are currently accessing
What is the system procedure used to create a user-defined datatype
What are the two common levels of locking ?
Can you commit to a savepoint ?
What does @@trancount tell you?
Is it possible to get a deadlock on a SELECT query?
How can you view the code for a stored procedure
Which Sybase library is not thread safe?
What type of column is used for auto-generated reference numbers?
What utility can be used to transfer large quantities of data from a flat file into a Sybase database