Skip to content

Instantly share code, notes, and snippets.

View abdulsamedkayaduman's full-sized avatar
🎯
Focusing

abdulsamed kayaduman abdulsamedkayaduman

🎯
Focusing
View GitHub Profile
DECLARE
c_id hr.employees.employee_id%type;
c_name hr.employees.first_name%type;
c_surname hr.employees.last_name%type;
CURSOR c_employees is
SELECT employee_id, first_name, last_name FROM hr.employees;
BEGIN
OPEN c_employees;
LOOP
CREATE TABLE Table6(
t_number number,
t_name varchar2(30)
) PCTFREE 90
PCTUSED 10;
DECLARE
BEGIN
FOR i in 1 .. 10000 loop
@abdulsamedkayaduman
abdulsamedkayaduman / gist:019a718ab9017e13277415f4772181a6
Created July 14, 2017 13:31
Java Oracle Employees Tablosundan veri yazdırma
package oarcle;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
public class OracleJDBCExample {
@abdulsamedkayaduman
abdulsamedkayaduman / gist:d1ae401d5cdb5fcfefd5c495426bf28d
Created July 13, 2017 13:44
Eski tablo kullanarak yeni tablo kopyalama süresi
DECLARE
beforeNolog TIMESTAMP;
afterNolog TIMESTAMP;
BEGIN
beforeNolog := SYSTIMESTAMP; -- Başlangınç Zamanını atadık
EXECUTE IMMEDIATE 'CREATE /*+ append nologging */ TABLE Staj_new4 AS SELECT * FROM Staj';
afterNolog := SYSTIMESTAMP;
@abdulsamedkayaduman
abdulsamedkayaduman / gist:90fadcab872166177eb226dab0abc80e
Created July 13, 2017 13:08
append nologging /*+ append nologging */
DECLARE
beforeNolog TIMESTAMP;
afterNolog TIMESTAMP;
BEGIN
beforeNolog := SYSTIMESTAMP; -- Başlangınç Zamanını atadık
FOR i in 1 .. 1000000 loop
INSERT /*+ append nologging */ INTO
Staj VALUES ('2dasdasd','dsads');
--SELECT * FROM Staj_2017;
DECLARE
i NUMBER;
Time_second NUMBER;
timeStart TIMESTAMP;
timeStop TIMESTAMP;
timeCommit TIMESTAMP;
timeRollback TIMESTAMP;
BEGIN
timeStart := SYSTIMESTAMP; -- Başlangınç Zamanını atadık
FOR i in 1 .. 2000000 loop
package snippet;
import java.io.File;
public class main
{
public static void main(final String[] args)
{
File aDirectory = new File("C:/deneme");
String[] filesInDir = aDirectory.list();
CREATE OR REPLACE DIRECTORY samed_data AS 'C:\deneme';
GRANT READ, WRITE ON DIRECTORY samed_data to PUBLIC;
DECLARE
name_column varchar2(3);
column_size number(15);
i_inCounter number(12);
line_size number(10);
i_count number(3);