Skip to content

Instantly share code, notes, and snippets.

Avatar

radityo radityopw

View GitHub Profile
View dummy_code_kupon.php
<?php
// membuat koneksi
$con = mysqli_connect('localhost','root','');
mysqli_select_db($con,"coupon_test");
// set kode kupon
$code = "CQ839";
@radityopw
radityopw / kupon.sql
Created Feb 15, 2017
contoh pembuatan tabel kupon.sql
View kupon.sql
CREATE TABLE `kupon` (
`code` varchar(5) NOT NULL,
`max_usage` int(11) NOT NULL DEFAULT '10',
`usage` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `kupon` (`code`, `max_usage`, `usage`) VALUES ('CQ839', '10', '0');
View catatan_tugas_on_spot_pbd_2016.txt
buatlah presentasi ppt / pptx
mengenai relational model dan relational algebra
menggunakan tools https://dbis-uibk.github.io/relax/calc.htm
presentasi secara umum bebas dan kreatif namun berisi hal2 ini :
1. penjelasan tentang schema yang digunakan
a. penjelasan tentang Relation nya termasuk structural feature dan feature yang lainnya yang dibutuhkan
b. Penjelasan tentang Key yang ada pada setiap relation, kenapa memilih key itu
View sp_6.sql
use tempdb
go
-- membuat functions
CREATE FUNCTION dbo.salesOrderTerakhir(@nilai_terakhir int = 5)
returns table
as
return (
select * from (
View sp_5.sql
use tempdb
go
-- membuat functions
CREATE FUNCTION dbo.minimum(@nilai1 float, @nilai2 float)
returns float
as
begin
declare @min float
View sp_4.sql
use tempdb
go
select avg(totaldue) as rata from adventureworks2012.sales.salesOrderHeader
View sp_3.sql
use tempdb
go
-- membuat stored procedure
CREATE PROCEDURE dbo.usp_mencoba1 @min_len_middle_name int , @max_len_middle_name int, @jml int out
as
begin
select @jml = count(*) from AdventureWorks2012.Person.Person where len(middleName) between @min_len_middle_name and @max_len_middle_name
View sp_2.sql
use tempdb
go
-- membuat table dan stored procedure
create table radityo_coba1(kunci varchar(255),value text);
GO
CREATE PROCEDURE dbo.usp_mencoba1 @min_len_middle_name int = 3
as
View sp_1.sql
use tempdb
go
-- membuat table dan stored procedure
create table radityo_coba1(kunci varchar(255),value text);
GO
CREATE PROCEDURE dbo.usp_mencoba1
as
You can’t perform that action at this time.