Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
data control the data control mostly refers to commands that permit system and data privileges to be passed to several users these commands are
consider a relation s over the attributes a and b with the following characteristics5000 tuples with 10 tuples per pagea 2-level b tree
sub query in the update commandexample double the commission for employees who have got at least 2
insert into command values can be inserted for all columns or for the selected columns values can be given by sub query in place of values parameter
having clause this clause is used for producing conditions on grouped informationexample find maximum salary and department number of those
group by clauses bull it is used to group database tuples on the basis of definite common attribute value like as employees of a department where
aggregate functions some of these functions are min count max and avg these functions help in getting consolidated information from a set of
order by clause by using this rows can be sortedit is used in the last portion of select statement by default it gets ascending order desc is used
logical operatorsrules of precedenceorder evaluatedoperator1all comparison operators2not3and4orexample to produce those records of salesman or
special comparison operator used in where clausea between andit gives range among two values inclusiveexampleselect ename sal from empwhere
to eliminate duplicate rows distinct operator exampleselect distinct deptno from
using literal character stringexampleto print ltnamegt is a ltjobgt as one string with column name employeeselect ename is a job as employee from
concatenation operatorexample printing name and job as one string as column name employees select enamejob employeesfrom
using column aliasesexampleto print column names as name and annual salary select ename name sal12 annual salary from
operator precedencethe basic operators used in sql are - operators of the similar priority are evaluated from left to rightparentheses are
select statementthis statement is used for retrieving information from the databases it can be coupled with many clauses let us talk about these
data manipulation languagedata manipulation language dml describes a set of commands that are used to query and change data within existing schema
drop table commandwhen an existing object is not needed for further use it is always better to eliminate it from the database to remove the existing
example -alter table emp modify empno number
alter table command this command is used for variation of existing structure of the table in the given situation when a new column is to be added to
create table prodtranspno number 4ptype char 1 check ptype in irs qty number 5foreign key pno references product pno on delete cascade in the
column constraints not null unique check primary key default referenceson delete cascade using this key whenever a
guidelines for creation of table table name should begin with an alphabet in table name single quotes and blank spaces are not allowed reserve words
data definition languageit organises the data in the form of columns and rows but what does the data field column of table accumulate how do you
difference between sql and sqlplussqlsqlplussql is a languagesql plus is an environmentit is based on