Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

veeresh kethari

{ City } bangalore
< Country > india
* Profession * dba
User No # 38517
Total Questions Posted # 1
Total Answers Posted # 17

Total Answers Posted for My Questions # 3
Total Views for My Questions # 4967

Users Marked my Answers as Correct # 51
Users Marked my Answers as Wrong # 11
Questions / { veeresh kethari }
Questions Answers Category Views Company eMail

When you first load SQL SERVER you will startup with what all databases?


3 SQL Server 4967

Answers / { veeresh kethari }

Question { Choice Solutions, 6013 }

Regarding joins what are the differences you observed in
oracle 9i and sql server?


I'm not happy with Uma answer,anybody can explain?please

Is This Answer Correct ?    0 Yes 1 No

Question { 17962 }

what is explain plan?


The explain plan command is a tool to tune SQL statements.To
use if you must have an explain_table generated in the user
you are running the explain plan for.This is created by
using the utlxplan.sql script.once the explain plan table
exists u run the explain plan command giving as it's
argument the SQL statement to be explained.The explain_plan
table is then queried to see the execution plan of the
statement.Explain plan can also be run using tkprof.

Is This Answer Correct ?    11 Yes 1 No

Question { 3333 }

when inserting to a table how many rows will be effected
using triggers


Before commit in the database,data will get store in the
INSERTED table in trigger. From the table we can come to
know how many records are affected in the table.

Is This Answer Correct ?    1 Yes 0 No

Question { 6992 }

what is the difference between group and having
give an example with query and sample output


Where: 'WHERE' will filter the data before grouping

Having:'HAVING' will filter,after the grouping the data.

Is This Answer Correct ?    3 Yes 0 No

Question { Ramco, 34014 }

How to select nth record from a table?


select min(sal) from EMP where sal in(select top n sal from
order by SAL desc)

Is This Answer Correct ?    3 Yes 0 No

Question { Aptech, 5602 }

i want to create procedure for create table in sql server

for example

create procedure create_table
@table varchar(20)
create @table(
id int,
name char(20)
but it will get error
what is solution?


Here is the solution...

create proc CREATE_TABLE
@TableName varchar(50)
declare @String nvarchar(max)
set @String='create table '+@TableName +'(ID int,Name
execute sp_executesql @String

Is This Answer Correct ?    1 Yes 0 No

Question { 247Customer, 3356 }

How to handle errors in Stored Procedures. I want to display
a message to the user in the .aspx page that is calling a
stored procedure in it's code behind. please help me.


With simple example:

begin try
declare @int int
set @int='select 1/0'
end try
begin catch
print 'Error detected with error number -'+convert(char
end catch

Is This Answer Correct ?    1 Yes 0 No

Question { 2615 }

Define Check points and End Points?


CheckPoints:Whenever we perform any DML operations in the
database,it will go to the checkpoint and then commit in
the database.If we don't have checkpoints,the data will get
store in transaction log file,once it got fill full,it will
make the database performance issues.
Endpoints:Endpoints are objects that represent a
communication point between the server and a client.

Is This Answer Correct ?    4 Yes 0 No

Question { 6588 }

What is Schema? and why we use schemas?


Schema is a collection of database objects.Using database
objects will manage the data in the database.

Is This Answer Correct ?    8 Yes 0 No

Question { 6697 }

what is syntex second or third highest salary.

thanks & Regards
Dhirendra sinha


with Topsal (EmpID,Ename,Sal,Dno,Topsal) as
(select *,row_number() over(order by sal) Topsal from emp)
select top 2 EmpID,Ename,Sal,Dno from Topsal order by sal desc

Is This Answer Correct ?    1 Yes 0 No

Question { 4929 }

i have a table #temp1(id, Name groupname ) and record
like this 1 R1 S
2 R3 S
3 R2 S
4 R4 D
5 R5 D
6 R6 K
7 R7 K
8 R8 L
9 R9 L
10 R10 L
11 R11 K

and i want to display record based on user defind sorting
order e.g.
1 R4 D
2 R5 D
3 R6 K
4 R7 K
5 R11 K
6 R1 S
7 R3 S
8 R2 S
9 R8 L
10 R9 L
11 R10 L



Is This Answer Correct ?    2 Yes 0 No

Question { 9619 }

Please get the 4 th maximum salary from a table without
using any sql keyword (TOP,MAX are mot allowed)


with SalCTE (EMPID,Ename,Sal,Num)as

(select *,row_number() over(order by sal desc) num from emp)

select * from SalCTE where Num=4

Is This Answer Correct ?    1 Yes 1 No

Question { Deloitte, 23625 }

how to get the maximum among two tables,for example table 1
(dep1) have (emp_id,emp_name,salary) columns and table 2
(dept2) have (emp_id,emp_name,salary) columns,i want which
employee have the maximum salary among two tables?


User CTE:

with Temp as(select max(sal) Sal from Table1
select max(sal) sal from Table2)
select top 1 * from Temp order by sal desc

Is This Answer Correct ?    3 Yes 0 No

Question { Apollo, 4679 }

What is the joins and how many types of Joins in sql server
a diffrentiate ever one give a suaitable query


1.Inner join:All the matched records from the both tables.
2.Left outer join: All the matched records from the both
tables and unmatched records from the left table.
3.Right outer join:All the matched records from the both
tables and unmatched records from the right table.
4.Self join:Joining the table itself.
5.Cross join:Cross join will give u the Cartesian product
from the 2 tables,it won't allow 'where' clause.

Is This Answer Correct ?    3 Yes 1 No

Question { HP, 6456 }

How to avoid cursors?


1.By using case.. set,we can avoid the cursors

2.By using temporary tables/table variables/CTE
with while loop we can avoid cursor in the transaction.

Is This Answer Correct ?    3 Yes 1 No

 [1]   2    Next