Java: Primitive Data Types
Primitive Type Size Range of Values (inclusive) byte 8 bits –128 to 127 short 16 bits –32768 to 32767 int 32 bits –2147483648 to 2147483647 long 64 bits –9223372036854775808…
Primitive Type Size Range of Values (inclusive) byte 8 bits –128 to 127 short 16 bits –32768 to 32767 int 32 bits –2147483648 to 2147483647 long 64 bits –9223372036854775808…
The program below uses the typical expressions of the so called "wooden language" which is actually talking with impressive expressions but finally say nothing. I was originally inspired from the…
With the code below you can connect to an Oracle database using JDBC driver and fetch some data: (you can find the libraries needed below) import java.sql.*;import java.util.Date;import java.util.Properties;public class…
How to retrieve session information: select S.LOGON_TIME ,sid, serial#, username, command, lockwait, status, osuser, sql_text, machinefrom v$session s, v$sqlarea q where s.sql_hash_value = q.hash_valueand s.sql_address = q.addressand osuser = 'zzz'and…
How to create a pivot query: with t as ( select 1 GRP_NR, 'A' val from dual union allselect 1 ,'B' val from dual union allselect 2 ,'A' val from…
How to create user and give the necessary grants:
create user 'ms'@'111.222.11.22' identified by 'swkb123';
grant select, delete, insert, update on myschema.* to 'ms'@'111.222.11.22'
grant all privileges on myschema.* to 'ms'@'111.222.11.22';
(more…)
SWKB.NET is an online software development knowledge base for the following technologies: Oracle PL/SQL, Oracle DB, Java, Web Services, Application Servers, PHP, MySQL, HTML, CSS, Linux-Unix , Javascript, Siebel ,…
Code from login page: $link=mysql_connect("localhost","dbuser","****");if(!$link){ die("Couln't open database!");}$db="myschema"; mysql_select_db($db) or die("Could not open $db");if(!empty($_REQUEST['user'])){ $theUser=$_REQUEST['user'];}else{ $theUser="";}$result=mysql_query("SELECT * FROM users WHERE UserName='$theUser' ");$num_rows=mysql_num_rows($result);while($a_row=mysql_fetch_row($result)){ if($_REQUEST['pass']==stripslashes($a_row[1])){ $msg=""; $_SESSION['user']=$theUser; $_SESSION['userGroup']="admin"; }}