Class 13
Class 13
One
another one :
one : joins
deleting all the dep id , from employee table , which are not present in dep table.
note : for delete , we don’t require column , for update we require column
how it works
each row from employes goes and check in dep table , whether it is present or not.
if it is present exist will return true , return 1 or more mores , if it is false then it returns 0
it's not efficient, as it will check each employee with department id column , until it macth , if match
found , it stops and return true else false .
its just one where condition , after that we can use joins , sub query or what ever
is independent sub query, were, it return the data , does not run again and again
outer quey will compare against the result from inner query
each row from empl table will visit dep by row by row again and again
but in here , outer quey will run inner query every time
DCL command
Roles :
were , we can create role , and add members to to it , we can give access to role instead for invidual
persons
TCL Commands
what ever happens b/w this two will be rollbacked , which will not effect the main data.