java programming of javat point, Exercises of Java Programming

detail of java and brief detail of java

Typology: Exercises

2021/2022

Uploaded on 11/15/2022

mitali-gadhiya
mitali-gadhiya 🇮🇳

5

(1)

5 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
NAME : Mitali Gadhiya ENROLLMENT NO : 186250307015
1
February 20, 2021
PRACTICAL : 4
Create the following table and insert the following records in
it. Perform queries for DCL Commands like, GRANT AND
REVOKE in it and Locks.
Table like that:
1. Create table on SQLyog.
a. Click on table.
b. Select create table.
c. Enter detail of table.
d. Then insert data on this table.
Player id
Name
Country
UserName
1
Sachin Tendulkar
India
BCCI_USER
2
Rahul Dravid
India
BCCI_USER
3
Anil Kumble
India
BCCI_USER
4
Ricky Ponting
Australia
CA_USER
5
Shane Warne
Australia
CA_USER
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download java programming of javat point and more Exercises Java Programming in PDF only on Docsity!

PRACTICAL : 4

Create the following table and insert the following records in

it. Perform queries for DCL Commands like, GRANT AND

REVOKE in it and Locks.

Table like that:

  1. Create table on SQLyog. a. Click on table. b. Select create table. c. Enter detail of table. d. Then insert data on this table. Player id Name Country UserName 1 Sachin Tendulkar India BCCI_USER 2 Rahul Dravid India BCCI_USER 3 Anil Kumble India BCCI_USER 4 Ricky Ponting Australia CA_USER 5 Shane Warne Australia CA_USER
  1. Execute DCL command.
  2. First create user like this. CREATE USER ‘usernm’ IDENTIFIED BY ‘pwd’
  3. Then give the grants like select, insert, and all etc…
  4. Syntax like this: GRANT SELECT,INSERT ON databasenm. tablenm TO usernm;
  1. And revoke all privileges.
    • Same as procedure and function. [GRANT & REVOKE]
      1. Procedure [grant]:
  1. procedure [revoke]:
  2. function [grant]:
  1. give the privileges. And click save changes.
    • you can also give grant option of user.

• LOCK

  • You can lock on table with write and read mode.
  • Syntax like this: LOCK TABLES players WRITE;
  • Syntax like this: LOCK TABLES players READ;
  • You can also lock multiple tables
  • Syntax like this: LOCK TABLES players READ , user WRITE;