Wednesday, July 23, 2008

Sybase Interview QuestionS SET-IV:

  1. what is In & OUT in stored procedure?The output keyword may be specified in the sp creation statement if the parameters can bepassed both in and out of the sp,when passing out you must specifiy output keyword inexecution statement
  2. Tell me the limitation of the Trigger?any create commend,drop command,alter table,grant,revoke,select into,truncate,update statistics are not permitted in trigger
  3. can I update view?yes,but view had created using only one table than update is possiable
  4. what is difference between constraints and rules?rules deals with constant and one rule can bound one column,constraints can bound many column and it can be compare with column in another table
  5. How will you bind a rule?sp_bindrule
  6. Explain about @@sqlstatus?It returns the status of the pervious fetch statement in a cursor
  7. What are the steps involved in creating cursor?Declaring cursors,declaring variables,opening cursors,fetching rows,main loop,closing the cursor,deallocating cursors
  8. What is Transaction Log?It is a database level system table called syslogs,which contains a sequential list of all modification to every objects in the database.
  9. Compare Rollback transaction and Rollback Trigger?
  10. How will bcp out the Identity column?-E
  11. What is Demand lock and Dead lock?A deadlock occurs when there is a cyclic dependency between two or more transactions for the same set of resources.Demand Lock:A demand lock prevents any more shared locks from being set on a data resource (table or data page). Any new shared lock request has to wait for the demand lock request to finish.
  12. How to get the last month’s last Day?select datename(dw,dateadd(dd,30-datepart(dd,getdate()),dateadd(mm,-1,getdate())))
  13. What is patindex()?returns the starting postion of the specified ,else 0
  14. How do I get the Duplicate rows from a table?select * from table name group by column1 having count(*)>1
  15. What is command permission and object permission?OP is Grant/revoke to these objects for permissions which includes select,update,delete,execute.CP is grant /revoke permission for create (db,table,view,procedure,defaults)

No comments: