Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002

    Unanswered: Some basic SQL questions

    Question 1.
    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.

    Question 2
    What is the syntactical error in the following statement?
    select * from BIG_TABLE
    where InputTime = max(InputTime)

    Question 3
    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
    4 D
    5 E
    6 F

    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
    Question 4
    How do you find out what database you are currently accessing

    Question 5
    What is the system procedure used to create a user-defined datatype

    Question 6
    What are the two common levels of locking ?

    Question 7
    Can you commit to a savepoint ?

    Question 8
    What does @@trancount tell you?

    Question 9
    Is it possible to get a deadlock on a SELECT query?

    Question 10
    How can you view the code for a stored procedure

    Question 11
    Which Sybase library is not thread safe?

    Question 12
    What type of column is used for auto-generated reference numbers?

    Question 13
    What utility can be used to transfer large quantities of data from a flat file into a Sybase database

  2. #2
    Join Date
    Nov 2002
    homework is not supported here

  3. #3
    Join Date
    Mar 2001
    Lexington, KY
    Agreed. PM me if you have any questions.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts