0% found this document useful (0 votes)
11 views5 pages

Omkar

Uploaded by

Tushar Haldankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

Omkar

Uploaded by

Tushar Haldankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

** DDL

Data definition. languge. It deals with database schemas e descriptions of how the
data should reside in the database.

Create to create database & its objects like table, Viekis, functions, folggers.

Alter alters the structure existing database. delete objects from the databy of the

Drop Truncate - remove all records table from 9

add dheut a Comments to the dictionary.

Rename rename an abjects.

What is a subquery A subquery is a query that appears inside another query


statement A subquery nested inside is a query that is a SELECT, INSERT, UPDATE or
DELETE statement or inside another subquery..

***********************************************************************************
*************
What is you can reased Diffrence drop *Delete. It is stored A stored save over
procedure ! procedure SQL code thout so the code can be and over again.

Delete, miniate & betn data manipulation. languge command. It is used to delete
one or more tuples in of table can one one. With the help of delete the either
delete all the row's in or cam delete rokes one by

Delete from all ray - rok of the Delete from wohne

& Drop - It is DDL langue Command It is und to drop kihol table By wing last table
this Commend the whole. lost. Drop table

& Trumcate It is DD2 languge It is used to delete all opfaction (feetle) in one go.
***********************************************************************************
*************
Diffrence beth * Unique key unique key & primary key

can accept null values. 2) A there. can be multiple unique

on a 3) Uniquely isn't table determines a Jew which

4) Creates non- clustered index.

* Primary key CRE :) It will not accept null values.. 2) A table can have only one
primary

key. 3 Use d to serve as a unique.

identifier for each rok in a table. 4) Create cluster index

Diffrence beth stored. procedux ( femetion


***********************************************************************************
*************
various clauses
insert cause

Delete clause

Union clause

group by claus
Update clause

select clause
To there clause

12) What is index. indexes are & its type to speed up query process in sal server,

1) Clustered index clustered index defines the order in which data is physically
stored in q table

2) Non clustered index It doven't sort the physical data inside the table.

(5)

normalization. it is the technique of organizing. data in the database.

get is und for mainly, eliminating redudant (Useless data) (2) Ensuring data
dependency make

Sense.
***********************************************************************************
*************
Function

1)

Function-It must return a value

Procedure It is optimal

Function can have only input parameter

Procedure can have input & output parameta

3)

functions can be called from procedure.

Procedure carnat be call from function.

4) it Cannot use fremsacti

can use in function. Fork 1 dremsactions in v procedure.

5) Can't return multiple results. it It can return meeltiple results.

18
There are 2 table employees & department 1. How you can get the data which employee
is working. on which department ?
***********************************************************************************
*************
Sintax SELECT column-name (s) FROM table, I ME LEFT JOIN table 2 ON table 1.
column_name = table 2. column-name ;

Right jain This keylord returns from all records the right table (table 2) @the.
matching records from the left table (table 1) The result is o if there is no
match.

syntax
SELECT column_name (s) From table 1 unfaks: 2 922

RIGHT JOIN table 2

ON table1. Column-name =

table 2. column-name;

What is primary key -Primary key uniquely identifies each record in a table.
Primary key must contain Unique values. & cannot contain null
A table com have only one primary. key in the table, this primary key can.
***********************************************************************************
*************
Inner join

The inner join Keywords selects records that have matching values in both tables

Syntax

SELECT Column_name (s)

FROM table 1

INNER JOIN table 2

ON

table 1

Column_name

table 2. column- name;

Outer join

Outer join returns unmatched rows.

from both tables.

Syntax P

SELECT Column-name
From table I

Full Outer Join tablez

ON table Column_name table 2. Column_name

WHERE condition,

Left join The left join keyword returns all records from the left table (table 1) f
matching records from right table (tabler). The result is a records from the right
side, if there no match.
***********************************************************************************
*************
Consist of single or multiple columns.

Can primary key have null value? No we can't have a primary key column with a null
NULL value. Reason is primary key is uniquely identifies records. If to records of
a Single Column have a Nell value the column

values are not considered. 4) Waiting as DML & DDL queries. equal.

DML - Data manipulation language. It deals with & includes mast data manipulation.
common S91 statements. such SELECT, INSERT UPDATE, DELETE etc. e it is und to store
retrieve, modity delete & update data in database.

SELECT- retrieve data from database INSERT- insert data into table UPDATE updates
existing. table delete DELETE all a database insert or data withing records table.
update from MERGE peration.
***********************************************************************************
*************
Hith the help of.. frunceete bee Can't delete single roh

Truncate;

What is Constraints &

Sal constraints. are a set of rukes implemented. on tables in relational databases


to dictate what data updated or can be inserted. I deleted in database.

Com He rollback delete, truncate & drep Command &

- Delete is

DD DM2 comment

it can be Drop & Command roll back. rell back trumpete is DDC & it cannot be

What is trigger 391 totgger is a database object which fires when an event eg.
occurs in a trigger record table Cam get insert in q database

***********************************************************************************
*************
14)

OOPS

Concepts -

Object lented programming system


1) Encapsulation

means

to

enclase something

2) Abstraction its easier to reason & design q

program

(3) Inheritance - support classes support the notion of almost alklays inheritance

(4) Polymorphism It allows for the uniform treatment of classes in hierarchy.

15

Foreign key constraints R

It is a key that is und link the tables together.

You might also like