SQL Comparison
SQL Comparison
Structured data
Structured data are facts concerning objects
and events. The most important structured data
1
are numeric, character, and dates. Structured
data are stored in tabular form.
SR.NO. Char Datatype
It is used to store character string of fixed
length specified.If length of string is less than
1 set or fixed length then it is padded with extra
blank spaces.
Nested subQuery
In Nested Query,inner query runs first,and only
1 once,outer query executed with result from
inner query( Bottom up approch)
SQL
Sr.No. Limit
1 Limit 1,1
2 Limit 3,1
3 Limit 4,1
Unstructured data.
Varchar
It is used to store character string of
veriable length. If length of string is less than
set or fixed length then it is NOT padded
with extra blank spaces.
NOSQL
It works with non relational database
TRUNCATE
Truncate will actually remove all the rows
from a table and there will be no data in the
table after we run the truncate command
whereas we cannot use a Where clause with
TRUNCATE
whereas TRUNCATE is executed using a
table lock and the entire table is locked for
removal of all records
whereas TRUNCATE is a DDL command.
whereas to use Truncate on a table you need
at least ALTER permission on the table.
whereas TRUNCATE TABLE removes the
data by deallocating the data pages used to
store the table data and records only the
page deallocations in the transaction log.
whereas TRUNCATE cannot be used with
indexed views.
Unique Key
we can have more than one Unique Key in a
table.
Unique Key may have only one null value
whereas by default, a Unique Key is a unique
non-clustered index.
A Unique Key doesn't support an Auto
Increment value.
MINUS OPERATOR
It allow us to retrive UNCOMMON records of
i table 1 (intial table) and common records
of all table get minus and the resultant table
is table 1
HAVING clause
HAVING clause can be used only with a
Select statement.
Function
function can only have input parameters.
Answer
Where Column name LIKE "A%"
Where Column name LIKE "%A"
Where Column name LIKE "%A%"
Where Column name LIKE "_A%"
Highest position
select one row after First Row i.e 2nd highest
select one row after Third Row i.e 4th highest
select one row after Forth Row i.e 5th highest
P U N E
P U N E
6194950
SD 7% 433646.5
GST 5% 309747.5
R 30000
30000
7% 0
5% 0
15000
5,855,550
463646.5
5731304
Operator
2 PU N E
Varchar