*****Library for OleDb command and Connection Imports System.Data.OleDb ** *****Declaration for command, connection and Reader Public dcom As OleDbCommand Public dcon As OleDbConnection Public dbrd As OleDbDataReader Public sql As String ** ******Connection String *******2000 – 2003 Version (.mdb format) **A. dcon = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source = " & Application.StartupPath & "\maindata.mdb") dcon.Open() **B. dcon = New OleDbConnection("provider=microsoft
Words: 728 - Pages: 3
Public Class RBTree Public root As RBTNode Dim null As RBTNode Public Sub New(ByVal data As Integer) null = New RBTNode("-1") null.color = "black" root = New RBTNode(data) root.color = "black" root.Left = null root.Left.parent = root root.right = null root.right.parent = root End Sub Public Sub New() End Sub Public Sub Insert(ByVal data As Integer) null = New RBTNode("-1")
Words: 819 - Pages: 4
Table Name : Employee EMPLOYEE _ID FIRST_NA ME LAST_NA ME SALA RY JOINING_D ATE DEPARTME NT 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael Clarke 800000 01-JAN-13 12.00.00 AM Insurance 3 Roy Thomas 700000 01-FEB-13 12.00.00 AM Banking 4 Tom Jose 600000 01-FEB-13 12.00.00 AM Insurance 5 Jerry Pinto 650000 01-FEB-13 12.00.00 AM Insurance 6 Philip Mathew 750000
Words: 4444 - Pages: 18
only work properly if relations are Union-Compatible, which is based on the names of the relation attributes that must be the same and their data types must be alike. Being compatible does not mean the data types have to be exactly the same. For example, both data types can be used to store numeric values such as NUMBER and SMALLINT as well as character (string) values such as VARCHAR and CHAR. An SQL IN statement can be used with where clause to list a set of matching records of a table. We can
Words: 673 - Pages: 3
into the cursor each tuple of the relation, we can write a program to read and process the value of each such tuple. If the relation is stored, we can also update or delete the tuple at the current cursor position. The example below illustrates a cursor loop. It uses our example relation T1(e,f) whose tuples are pairs of integers. The program will delete every tuple whose first component is less than the second, and insert the reverse tuple into T1. 1) DECLARE /* Output variables
Words: 583 - Pages: 3
| Database systems | Assignment # 1 | Areeba kamil (34421) | BSCS 4A | 10/4/2015 | 4.7. Consider the LIBRARY relational database schema shown in Figure 4.6. Choose the appropriate action (reject,cascade,set to NULL,set to default) for each referential integrity constraint, both for the deletion of a referenced tuple and for the update of a primary key attribute value in a referenced tuple.Justify your choices. CREATE DATABASE library; CREATE TABLE book( book_id int, title varchar(50)
Words: 1569 - Pages: 7
records which combines each row from the first table with each row of the second table. Cross JOIN Syntax is, SELECT column-name-list from table-name1 CROSS JOIN table-name2; Example of Cross JOIN The class table, ID | NAME | 1 | abhi | 2 | adam | 4 | alex | The class_info table, ID | Address | 1 | DELHI | 2 | MUMBAI | 3 | CHENNAI | Cross JOIN query will be, SELECT * from class
Words: 1005 - Pages: 5
Week 4 Melissa Maxwell Assignment Chapter 8 1. CREATE TABLE CUSTOMER CUST_NUM NUMBER PRIMARY KEY, CUST_LNAME VARCHAR CUST_FNAME VARCHAR CUST_BALANCE NUMBER; CREATE TABLE CUSTOMER_2 CUST_NUM NUMBER PRIMARY KEY, CUST_LNAME VARCHAR, CUST_FNAME VARCHAR CREATE TABLE INVOICE INV_NUM NUMBER PRIMARY KEY, CUST_NUM NUMBER, INV_DATE DATE, INV_AMOUNT NUMBER); 2. INSERT INTO CUSTOMER VALUES (1000, ‘SMITH’, JEANNE’ 11050.11); INSERT INTO CUSTOMER VALUES(1001, ‘ORTEGA’, ‘JUAN’ 840.92); INSERT INTO CUSTOMER_2
Words: 1092 - Pages: 5
MGS 8020 Business Intelligence Assignment 3 Please use the SQL (in MS Word) to answer the following questions. You may use subquery but all questions need to be completed in ONE SQL. You need to use the following tables (STUDENT and GPA) to answer Q1 – Q4. [pic] 1. What is the output if you have the following SQL? (10 points) Select * from STUDENT; Uncondition SQL that lists all the students from the student table with the respective columns. Select
Words: 438 - Pages: 2
SELECT column_list FROM table-name [WHERE Clause] [GROUP BY clause] [HAVING clause] [ORDER BY clause]; SELECT name, salary, salary*1.2 AS new_salary FROM employee WHERE new_salary /salary*1.2 > 30000; SELECT first_name, last_name, subject FROM student_details WHERE subject IN/NOT IN ('Maths', 'Science'); Select * from product p where EXISTS (select * from order_items o where o.product_id = p.product_id) -------------------------------------------------
Words: 652 - Pages: 3