|
|
-
Alok Chandra Shahi Answered 1 Years ago through Quizzes | 5 Points
**char**: data is padded with blanks to fill the field size. For example, if a char(15) field contains 7 characters the system will pad it with 7 blanks.It stores Non-Unicode values and requires 1 byte for storage of single character.
**nchar**: nCha...
|
-
Alok Chandra Shahi Answered 1 Years ago through Quizzes | 5 Points
Identity is a way to generate Numeric Sequence on specific column.It is the sequence of Identity Property
IDENTITY [ (seed , increment ) ]
Here [ (seed , increment ) ]**Seed**[ (seed , increment ) ] is first value,from which we start sequencing, and [...
|
-
Alok Chandra Shahi Answered 1 Years ago through Quizzes | 5 Points
Isolation is one of the ACID (Atomicity, Consistency, Isolation, Durability) properties.It manage when to show the changes made by any process/operation to another simultaneous running operation.
ANSI Standard Isolations Are-
**READ COMMITTED** -...
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
In first query you are performing left join with first table and same(left join) with another tables, so we will get all possible rows of 1st table and required row of another left joined tables it there exists.
but in 2nd query you are performing in...
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
Select Convert(Date,OrderDate) as OrderDate, Sum(Amount) as [Total Amount]
From dbo.Invoice
Where Convert(Date,Orderdate)=Convert(Date,Getdate())
Group by Convert(Date,OrderDate)...
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
Here we have query having performance issue,that is updating country of ipuser from iplookup table.
UPDATE dbo.ipUsers
SET country = (
SELECT country
FROM dbo.ipLookup
WHERE ip >= from_ip and ip < to_ip
)
...
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
Lets solve this problem manually,before going with queries
lets say we have this string **"Metals Group3,SVOC Group1,TPH,Cynide"** having test name separated by comma and we want to get each test name.
So i will pick the 1st position of comma from ...
|
|
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
Here is my solution
;with abc as (
SELECT
y.value('data(.)','int') AS bloggerId,
Case when y.value('local-name(..)','varchar(200)') ='name' then y.value('../text()[1]','varchar(200)') else ''...
|
-
Alok Chandra Shahi Answered 2 Years ago through Quizzes | 5 Points
Apply operator provides a way to get table value result set for each row. here we have 2 type of apply operator 1st one is Cross apply that is similar like inner joins and 2nd is Outer apply that is like outer join (Left joins).
Suppose format of apply...
|