Write a query to update third column such that
There is a table having the following columns :-student id marks1 marks2 maxmarks1 10 20 202 25 30 303 30 10 304 35 25 355 20 40 40write a query to...
What is the diff b/w btree index and bitmap index
A B-Tree index stores the index value and the physical rowid of the row. The index values are arranged in the form of leaves. A B-Tree index is used most when the cardinality is high. A Bitmap index ...
For example suppose we have using many distinct value for particular column in that time using b-tree index.
Bitmap indexes which is used low cardinaties values .
For example suppose we have using gender or flag column in that time using bitmap index .
CREATE TABLE aa(name varchar(10), marks1 int, marks2 int, maxmarks int);
INSERT INTO aa VALUES ('a',10,20,null);
INSERT INTO aa VALUES ('b',20,25,null);
UPDATE aa
SET maxmarks= CASE WHEN marks1 > marks2 THEN marks1 ELSE marks2 END;
Declare @tbl_Test TABLE([Name] Nvarchar(255),Mark1 int,mark2 int,maxmark int) Insert into @tbl_Test([Name] ,Mark1 ,mark2) VALUES ('a',50,20) Insert into @tbl_Test([Name] ,Mark1 ,mark2) VALUES ('b',10,...