You are on page 1of 6

Assignment 3 ..

SOME COMMANDS AND CLAUSES


USED
WHILE CREATING A USER
AND GRANTING HIM
RESOURCES.

Aatika Bansal CSE T1[B] 0891562708

SYNTAX

COMMANDS

DESCRIPTION

CREATE USER

To create and configure a database user, which is an


account through which you can log in to the database, and
to establish the means by which Oracle Database permits
access by the user.

username

Specify the name of the user to be created. This name can


contain only characters from your database character set
and must follow the rules
The IDENTIFIED clause lets you indicate how Oracle
Database authenticates the user.

IDENTIFIED
Clause

BY
password

The BY password clause lets you creates a local user and


indicates that the user must specify password to log on to
the database. Passwords can contain only single-byte
characters from your database character set regardless of
whether the character set also contains multibyte
characters.
To grant System privileges to users and roles

GRANT

Aatika Bansal CSE T1[B] 0891562708

commits the current transaction to the database,


disconnects the current username from Oracle Database,
and reconnects with the specified username.
CONNECT

CREATE USER username


IDENTIFIED BY password ;

SOME COMMANDS USED


WHILE CREATING TABLES
AND ENTERING VALUES
IN THEM.

Aatika Bansal CSE T1[B] 0891562708

COMMAND
S

Create

INSERT

DESCRIPTION
To make a new database, table, index,
or stored query. A CREATE statement
in SQL creates an object inside of
a relational database management
system (RDBMS).
The INSERT command in SQL is used
to add records to an existing table.

SYNTAX
CREATE [TEMPORARY]
TABLE [table
name] ( [column
definitions] ) [table
parameters].
INSERT INTO ...
VALUES ...

Edit

Enter EDIT with no filename to edit the


contents of the SQL buffer with the
operating system text editor.

edit

Desc

Describe an Oracle Table, View,


Synonym, package or Function or
simply structure.

DESC table

Aatika Bansal CSE T1[B] 0891562708

SOME COMMANDS USED


WHILE SOLVING OR
PERFORMING QUERIES
ON TABLE.

Aatika Bansal CSE T1[B] 0891562708

COMMANDS

DML

SELECT

UPDATE

DELETE

DDL

DESCRIPTION
The Data Manipulation Language (DML) is used to
retrieve, insert and modify database information.
These commands will be used by all database users
during the routine operation of the database.
The SELECT command is the most commonly used
command in SQL. It allows database users to
retrieve the specific information they desire from an
operational database.

SELECT ... FROM ... WHERE ...

The UPDATE command can be used to modify


information contained within a table, either in bulk or
individually.

UPDATE ... SET ... WHERE ...

The DELETE command with a WHERE clause can


be used to remove any record from table.

DELETE FROM ... WHERE ...

The Data Definition Language (DDL) is used to


create and destroy databases and database objects.
These commands will primarily be used by database
administrators during the setup and removal phases
of a database project.
To destroy an existing database, table, index, or

Drop

SYNTAX

Drop table tablename

view.

Alter

To modify an existing database object.

Edit

Enter EDIT with no filename to edit the contents of


the SQL buffer with the operating system text editor.

Aatika Bansal CSE T1[B] 0891562708

Alter table tablename


modify(column definations)
edit

You might also like