0% found this document useful (0 votes)
10 views1 page

Cat SQL

The document discusses configuring an Oracle database including creating a user, granting privileges, setting the default tablespace and quota. It also contains SQL queries to update data, find and remove duplicate records, and replace characters in date fields.

Uploaded by

Ari Ardiana
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)
10 views1 page

Cat SQL

The document discusses configuring an Oracle database including creating a user, granting privileges, setting the default tablespace and quota. It also contains SQL queries to update data, find and remove duplicate records, and replace characters in date fields.

Uploaded by

Ari Ardiana
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/ 1

pORT 1521

Oracle21c
sqlplus "/@localhost/orcl as sysdba"
sqlplus "/as sysdba"
alter session set "_ORACLE_SCRIPT"=true;
create user KPU_3206 identified by 123;
grant create session, create table, create procedure, create database link to
KPU_3206;
alter user KPU_3206 default tablespace USERS;
alter user KPU_3206 quota 20G on USERS;

UPDATE ms_karyawan
SET Nama_Karyawan = REPLACE(Nama_Karyawan, ']', '')

VARCHAR2\(80\)\r\n,
VARCHAR2(80)\n,
EXTPROC1521
https://localhost:5500/em

WBqdS[qT-oYkDUJ8
2!xrb%SW5Vr!

SELECT PJ.TPS_ID, COUNT(PJ.TPS_ID) FROM PDPB_JUNI pj


WHERE PJ.STATUS <> 'TMS'
GROUP BY PJ.TPS_ID

HAPUS DATA GANDA


SELECT TP.ID, COUNT(*) FROM TIDAK_PADAN_3206 tp GROUP BY TP.ID HAVING COUNT(*) >1;

DELETE FROM TIDAK_PADAN_3206 WHERE ROWID NOT IN (SELECT MAX(ROWID) FROM


TIDAK_PADAN_3206 tp GROUP BY TP.ID);

REPLACE:
UPDATE dpb_juli SET updated_at = REPLACE(updated_at, '-', '|');
UPDATE TIDAK_PADAN_AWAL SET TIDAK_PADAN_AWAL.TANGAGAL_LAHIR =
REPLACE(TIDAK_PADAN_AWAL.TANGAGAL_LAHIR, '-', '|');

You might also like