Tutorial Programming

Tutorial penggunaan SQL Arithmetic pada MYSQL


Hallo sahabat saya akan menjelaskan bagaimana logika aritmatika pada sql yang akan digunakan, nah langsung aja.

Misalkan:
field_1 = 6;
field_1 = 2;

Penambahan


SELECT (field_1 + field_1) as hasil FROM table;

Pengurangan


SELECT (field_1 - field_1) as hasil FROM table;

Pembagian


SELECT (field_1 / field_1) as hasil FROM table;

Pengkalian


SELECT (field_1 * field_1) as hasil FROM table;



Sekian tutorial saya semoga bermanfaat yah sahabat.

No comments:

Post a Comment

Tutorial Programming Designed by Templateism | Ary EJFA Copyright © 2015

Theme images by richcano. Powered by Blogger.