Folder options missing in windows XP.
This happens when your pc is attack by virus.
Eventhough the clean up is done the Folder options will be missing in windows XP. To enable this function.
1.Go to Run –>gpedit.msc
2. User Configuration –> Administrative Templates –> Windows Components –> Windows Explorer
Enable and then Disable “Removes Folder Options menu from Tools menu”
when you have time make sure of it to change it what you want to do..do not regret in future when you are old -LiNA
Sunday, 17 June 2012
Sunday, 15 January 2012
Change TCP/IP settings using cmd
When you often use a laptop on different netwoks you can very easily change your ip and much more by use this command. You can save the line in a batch file and run the file when you switch between home and work.
set address name="Local Area Connection" static 10.10.69.205 255.255.255.0 10.10.5.1 1
The syntax is:
set address [name=]InterfaceName [source=]{dhcp | static [addr=]IPAddress [mask=]SubnetMask [gateway]
set address name="Local Area Connection" static 10.10.69.205 255.255.255.0 10.10.5.1 1
The syntax is:
set address [name=]InterfaceName
Assigning a Static IP Address
To assign a Static IP Address to your network connection follow these steps:
- Open Network Connections
- Right click the connection you wish to assign a Static Address to and choose Properties.
- In the Properties box that comes up select "Internet Protocol TCP/IP" and click the Properties button beneath.
- In Internet Protocol TCP/IP Properties click dot in "Use the following IP Address".
- Enter the IP address you wish to use and OK the change. Click OK on Local Area Connection Properties.
- Reboot
Important Tips That Every Windows7 User Must Know
Tips Every Windows 7 User Needs To Know
Alt + P
In Windows Explorer, this will activates a preview pane of selected file, be it an image, sound, or video document. This panel is great for previewing images in your photos directory, obviating the need for fancier third-party software.
In Windows Explorer, this will activates a preview pane of selected file, be it an image, sound, or video document. This panel is great for previewing images in your photos directory, obviating the need for fancier third-party software.
Windows + Up and Windows + Down
If a window isn't maximized, pressing the Windows + Up arrow key will make it fill your entire screen. Windows + Down arrow will minimize that active window.
Windows + Shift + Up and Windows + Shift + Down
Hitting these three keys will vertically stretch an active window to the maximum desktop height (the width of the window, however, will stay the same). Pressing Windows + Shift+ Down will restore the window to its previous dimensions.
Windows + + and Windows + -
Pressing the Windows button with either the plus or minus key activates the Magnifier, letting you zoom in on the entire desktop or open a rectangular magnifying lens to zoom in on (and out of) parts of screen. You can also customize the Magnifier to follow your mouse pointer or keyboard cursor.
Windows + Left and Windows + Right
These two shortcuts will make your active window fill up exactly one half of screen-depending on which arrow key you use. And once a window is fixed to one side of the screen, you can repeat the shortcut with the same arrow key to flip it to the other side.
Windows + Home
This shortcut minimizes every open window on your desktop except the active window. Pressing this shortcut again restores all the minimized windows.
Windows + T
Like Alt + Tab (still our all-time-favorite Windows shortcut), Windows + T cycles through thumbnails of open programs via the Taskbar's peek menu.
Like Alt + Tab (still our all-time-favorite Windows shortcut), Windows + T cycles through thumbnails of open programs via the Taskbar's peek menu.
Windows + E
Automatically opens up a new Explorer window to show your Libraries folder.
Windows + P
Manage your multiple-monitor setup more efficiently with this handy shortcut. Windows + P opens a small overlay that lets you configure a second display or projector. You can switch from a single monitor to dual-display in either mirror or extend-desktop mode.
Manage your multiple-monitor setup more efficiently with this handy shortcut. Windows + P opens a small overlay that lets you configure a second display or projector. You can switch from a single monitor to dual-display in either mirror or extend-desktop mode.
Windows + Shift + Left and Windows + Shift + Right
If you're using two or more displays-and you are, aren't you?-memorize this shortcut to easily move a window from one screen to the other. The window retains its size and relative position on the new screen, which is useful when working with multiple documents.
Windows + [Number]
Programs (and new instances) pinned to your Taskbar can be launched by hitting Windows and the appropriate number key. Windows + 1, for example, launches the first application in the taskbar, while Windows + 4 will launch the fourth.
This shortcut performs the same function as moving the mouse to the bottom right of the Taskbar: It makes every active window transparent (save faint outlines) so you can view the desktop underneath.
Tuesday, 6 December 2011
Netsh winsock reset
Netsh Winsock Reset is fine command that can use in Microsoft Windows to reset winsock catalog back to default state. This steps able to be used if , all other suggested basic steps been use, such as reset web setting , clear cookies and history and reset ipconfig, flushdns.
or from suggestion:
1.No network connectivity due to registry errors
2. DNS lookup problem
3. Fail to renew the network adapter’s IP address or other DHCP errors
3. Network connectivity issue with limited or no connections message
4. Other networking problems
5. Internet or network problem after removing the adware, spyware, virus, worm, trojan horse, etc
6. Loss network connection after installing/uninstalling adware, spyware, antispam, vpn, firewall or other networking programs
7. Unable to access any webpage or can only access some web pages
8.Pop-up error window with network related problem description
STEPS TO BE DONE:
1)Go to Start and click Run…
2)Type cmd.exe and click OK.
3) Type netsh winsock reset in command prompt and hit ENTER button.
4) Restart the computer in order to complete the reset, after that test to access your network or Internet again.
Monday, 19 September 2011
How to increase your virtual memory
MEMORY POWER
Have you guys felt that your pc is hanging when open many application at one times.Felt like throwing your pc or laptop away..After this you wont felt like that anymore.You can resolved this issue by increasing the system paging file size also called as virtual memory.This will help to free up enough RAM for other application to run normally
Open system Properties;
click win key + pause key which will open system properties
or right click on my computer and click on properties
Control Panel > System > Advanced > Click on Settings (Under Performance) > Advanced > Change
Here under Drive (Volume label), you have option to select any of your hard disk drive, but the best choice is, select any drive other than C drive for virtual memory.
Set the double Initial & Maximum Size of your Virtual Memory. Here set initial size 700 MB and maximum size up to 1000MB; you can change this size according to the free space available on your hard drive.
Now you can open many application in one time without your desktop or laptop gets hang.
Wednesday, 31 August 2011
Want to Hide All Icons from the Desktop
Feel that desktop is messy. Wanted to make it look empty. Then you can try do this little trick.
- Start Regedit
- Go to HKey_Current_User \ Software\ Microsoft \Windows \ Current Version \ Policies \ Explorer
- Right click on the right panel and add a New / DWORD
- Name it NoDesktop
- Give it a value of 1
- Logoff or Reboot the computer
- Now all icons are hidden on the desktop
Want to add Items to the Start Button using Registry?
Before you start play with your registry, make sure you have backup or export your windows registry keys on backup drive, because a small mistake in Registry it will cost you to reformat your computer or laptop..so be extra careful with mr.registry.
- First click on Start button then type Regedit in Run option
- In Registry Editor look at left hand panel, and find HKey_Classes_Root / Directory / Shell
- Then Right click on Shell folder option and add any new key with descriptive name and Press Enter.
- Next Right click on that key and give the full path of that program you are interested to add in start button. For example if you want to add MS excel, then full path may be C:\program file\msoffice\msaccess.EXE.
- Close all open programs and access will appear in your computer Start button.
Files on External/Flash Drive Changed to Shortcuts Virus
Have ever your files in flash drive turn to shortcut and you unable to open them?
Now you can clear the shortcut's to view them normally back
In order to do this process you must not format the flash drive. because if you have formatted the flash drive , all the files will have been deleted.
Now you can clear the shortcut's to view them normally back
In order to do this process you must not format the flash drive. because if you have formatted the flash drive , all the files will have been deleted.
- Click on “Start” –>Run–>type cmd and click on OK.
- Check your external Drive letter in My Computer
- Here I assume your external drive as E:
- Enter this command.
- attrib -h -r -s /s /d g:*.*
- *Delete the unnecessary shortcuts.
P/S:Please replace the letter of E with your flash drive .
Tuesday, 16 August 2011
The Recycle Bin's Name!
Want to change The Recycle Bin's Name!
Now you can change the name of Recycle Bin of your system . It is quite interesting but it need some work around
step 1:click start button -> click run option
step 2 :Type here regedit.exe and press enter
step 3: Regedit editor
step 4: regedit editor open HKEY_CLASSES_ROOT folder, In this folder open the CLSID folder then open the {645FF040-5081-101B-9F08-00AA002F954E} folder >ShellFolder folder at last.
step 5: Change the data value from "40 01 00 20" to "70 01 00 20".
step 6: Restart your pc and you will find the option to rename Recycle bin name after clicking on Recycle Bin Icon. And now you are able to change the recycle bin name into anything you wish.
Saturday, 16 July 2011
Fairy Chat server
SOURCE CODE FOR FAIRYCHAT APPLICATION
Listing 1 is source code for FairyChatserver. The source code contains the coding to store the port on which the will listen for new connections. The chat server attempts to create a new server socket and begin to accept connections. First, a new ServerSocket object is created with a specific port. The code then enters an endless loop, continuously accepting connections and creating new chat client . The ServerSocket.accept() method waits forever until a new connection is established. When a new connection is detected, a Socket object is created inherently and returned. A new ClientConnetcion object is then constructed with the newly created socket. Since the ClientConnection is a Thread, we must call the start method to make the chat client code run.
To run the server, the users have to save the source code in java bin as “FairyChatServer.java”. Then the users have to compile in the command prompt.
LISTING 1
import java.net.*;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class FairyChatServer
{
// public FairyChatServer (int port) throws IOException ...
// public static void main (String args[]) throws IOException ...
public FairyChatServer () throws IOException
{
ServerSocket serverSocket = new ServerSocket (2000);
// The above statement is the ServerSocket class and its object serverSocket, which
// listen's for the port Number.
while (true)
// Here the above statement while loop which is ready to continuously listen for the
// client connection.
{
Socket client = serverSocket.accept ();
// The above statement get the client's socket.
System.out.println ("Accepted from " + client.getInetAddress ());
// Above statement get the Inet Address of each client.
ClientsConnections cCon = new ClientsConnections (client);
cCon.start ();
}
}
public static void main (String args[]) throws Exception
{
new FairyChatServer ();
}
}
class ClientsConnections extends Thread
{
protected Socket socket;
protected DataInputStream dti;
protected DataOutputStream dto;
static String selFont,selStyle,sendStr;
static int selSize;
public ClientsConnections (Socket s) throws IOException
{
this.socket = s;
dti = new DataInputStream (new BufferedInputStream (s.getInputStream ()));
dto = new DataOutputStream (new BufferedOutputStream (s.getOutputStream ()));
}
protected static Vector clientConnections = new Vector ();
public void run ()
{
try {
clientConnections.addElement (this);
while (true)
{
String msg = dti.readUTF ();
/* int i,li,starti,startli,end,chs;
String sub,sub1;
i=msg.indexOf(">");
starti=i+1;
li=msg.lastIndexOf(">");
startli=li+1;
sub=msg.substring(starti);
int subi=sub.length();
int start=0;
end=subi-3;
char ch[]=new char[end-start];
sub.getChars(start,end,ch,0);
sub1=msg.substring(startli);
String getCh=new String(ch);
selFont=new String(getCh);
int geNum=Integer.parseInt(sub1);
selSize=geNum;
int st,endStr;
st=0;
endStr=i;
char chrs[]=new char[endStr-st];
msg.getChars(st,endStr,chrs,0);
String getChs=new String(chrs);
sendStr=new String(getChs);*/
broadcast (msg);
}
} catch (IOException ex)
{
System.out.println(socket.getInetAddress()+" Client has been closed Connection...");
} finally
{
clientConnections.removeElement (this);
try
{
socket.close ();
} catch (IOException ex)
{
ex.printStackTrace();
}
}
}
// protected static void broadcast (String message) ...
protected static void broadcast (String message)
{
synchronized (clientConnections)
{
Enumeration e = clientConnections.elements ();
while (e.hasMoreElements ())
{
ClientsConnections cTypecast = (ClientsConnections) e.nextElement ();
try
{
synchronized (cTypecast.dto)
{
cTypecast.dto.writeUTF (message);
}
cTypecast.dto.flush ();
} catch (IOException ex)
{
cTypecast.stop ();
}
}
}
}
}
Listing 2 is source code to open the chat window for client to chat. The source code contains layout of Login window to log into the chat application such as user name, user password, start button and cancel button in UserFrame( ). Then next part of source code part contains the layout of the chat applet with certain main function to run the application. To run the chat applet the user have to save the source code in java bin as ClientWindow.java. Then user have to compile in command prompt in order to open the chat window applet and start chatting.
LISTING 2
import java.io.*;
import java.net.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
public class ClientWindow
{
public static void main(String args[])
{
Frame userFrame=new UserFrame();
userFrame.setTitle("Login Chat !");
userFrame.setSize(150,250);
userFrame.show();
}
}
class UserFrame extends Frame implements ActionListener
{
Frame chatClient;
Label nameLabel,passLabel,serverLabel;
TextField userText,passText,serverText;
Button startButton,cancelButton;
UserFrame()
{
setLayout(new FlowLayout(FlowLayout.LEFT));
nameLabel=new Label("User Name : ");
passLabel=new Label("Password : ");
serverLabel=new Label("Server Name : ");
userText=new TextField(15);
passText=new TextField(15);
passText.setEchoChar('*');
serverText=new TextField(15);
startButton=new Button("Start");
cancelButton=new Button("Cancel");
add(nameLabel);add(userText);
add(passLabel);add(passText);
add(serverLabel);add(serverText);
add(startButton);add(cancelButton);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
startButton.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
try
{
String uName,sName;
uName=userText.getText();
sName=serverText.getText();
Socket socket=new Socket(sName,2000);
chatClient=new
ChatClient1(socket,uName,sName,socket.getInputStream(),socket.getOutputStream());
chatClient.setTitle(uName+" : ChatWindow!");
chatClient.setSize(400,270);
chatClient.show();
}catch(Exception exp)
{}
}
}
class ChatClient1 extends Frame implements Runnable
{
protected DataInputStream dti;
protected DataOutputStream dto;
Socket socket;
protected TextArea dispMessage;
protected TextField sendMessage;
protected TextField input,uName;
protected Button sendButton;
protected Label selectColor,selectFont;
protected Choice choiceColor,choiceFont,choiceSize;
String userName;
String s;
String selFont,selStyle;
int selSize;
protected Thread listener;
public ChatClient1 (Socket socket,String userName,String serveName,InputStream
is,OutputStream os)
{
this.userName=userName;
dti=new DataInputStream(new BufferedInputStream(is));
dto=new DataOutputStream(new BufferedOutputStream(os));
setLayout (new FlowLayout(FlowLayout.LEFT));
setBackground(Color.blue);
setForeground(Color.black);
dispMessage=new TextArea(8,50);
selectColor=new Label("Colors ");
selectFont=new Label(" Font ");
choiceColor=new Choice();
choiceFont=new Choice();
choiceSize=new Choice();
GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontNames=ge.getAvailableFontFamilyNames();
for(int i=0;i<fontNames.length;i++)
choiceFont.add(fontNames[i]);
String sizeFont;
for(int i=8;i<=100;i++)
{
sizeFont=Integer.toString(i);
choiceSize.add(sizeFont);
}
uName=new TextField(userName,15);
sendMessage=new TextField(45);
sendButton=new Button("Send");
add(uName);
add(dispMessage);
add(selectColor);add(choiceColor);
add(selectFont);add(choiceFont);add(choiceSize);
add(sendMessage);add(sendButton);
sendMessage.requestFocus ();
uName.setEditable(false);
dispMessage.setEditable(false);
listener=new Thread(this);
listener.start();
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
});
}
public void run ()
{
try {
while (true)
{
String line = dti.readUTF ();
dispMessage.appendText (line + "\n");
}
} catch (IOException ex)
{
ex.printStackTrace ();
} finally
{
listener = null;
sendMessage.hide ();
validate ();
try
{
dto.close ();
} catch (IOException ex)
{
ex.printStackTrace ();
}
}
}
public boolean handleEvent (Event e)
{
if ((e.target == sendMessage) && (e.id == Event.ACTION_EVENT))
{
try
{
dto.writeUTF (userName+" : "+(String) e.arg);
dto.flush ();
} catch (IOException ex)
{
ex.printStackTrace();
listener.stop ();
}
sendMessage.setText ("");
return true;
}
else if ((e.target == sendButton) && (e.id == Event.ACTION_EVENT))
{
try
{
s=userName+" : "+sendMessage.getText();
dto.writeUTF (s);
dto.flush ();
} catch (IOException ex)
{
ex.printStackTrace();
listener.stop ();
}
sendMessage.setText ("");
return true;
} else if ((e.target == this) && (e.id == Event.WINDOW_DESTROY))
{
if (listener != null)
listener.stop ();
hide ();
return true;
}
else if((e.target == choiceSize) && (e.id == Event.ACTION_EVENT))
{
String selsStr;
selsStr=choiceSize.getSelectedItem();
selSize=Integer.parseInt(selsStr);
return true;
}
else if((e.target == choiceFont) && (e.id == Event.ACTION_EVENT))
{
selFont=choiceFont.getSelectedItem();
return true;
}
return super.handleEvent (e);
}
}
USER MANUAL
To Use system
System Requirements
Operating System: Windows* 98/Me/2000/XP
Processor: Pentium* III 800 MHz or any affordable processor
Memory: 128 MB RAM (256 MB RAM Recommended)
Software: 1) j2sdk1.4.2_15 (77.3 MB size)
2) Command prompt
3) Notepad
Misc. Hardware: Keyboard and mouse (compatible with PC or laptop)
INSTRUCTION
- Start Windows* 98/Me/2000/XP.
- Copy FairyChatServer and ClientWindow source code in notepad and save it in java bin according to the class name .
- Open command prompt and compile FairyChatServer.java
- Then Open a different command prompt an compile ClientWindow.java.
- Once the Chat window open, user may start to chat.
Step 1:
Compile FairyChatServer.java in Command prompt
Step 2:
Compile ClientWindow.java in Command prompt
Step 3:
Key in User name ,Password and server name in login Applet once it appear after compiling ClientWindow.java
Step 4:
Click the Start button to log in.
Step 5:
User may start chat once the Chatwindow appear.
Step 6:
To send the text .User may enter the text in text box and click send to send the text to other user and wait for the reply from other user.
Step 7:
To exit the Chat room, user has to click the close button to exit
so guys who want to have their own chat server in college or among freinds. Can use this chat applications.
Database - mysql queries -part12
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.37-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database Customer;
Query OK, 1 row affected (0.00 sec)
mysql> use Customer;
Database changed
mysql> create table Customer
-> (Cust_Num char(3) primary key,
-> Cust_Name char(20),
-> Street char(25),
-> City char(15),
-> Balance decimal(8,2),
-> Credit_Limit decimal(8,2),
-> Rep_Num char(3));
Query OK, 0 rows affected (0.13 sec)
mysql> insert into Customer values
-> ('148','Hot Sports Center','2115 Jln Mansoor','Kangar','6550.00','7500.00
','20');
Query OK, 1 row affected (0.06 sec)
mysql> insert into Customer values
-> ('282','Panas Direct','3827 Nawawi','Kuching','431.540','10000.00','35');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('356','Fergusons','482 WildWest','Delhi','5785.00','7500.00','65');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('408','Everyone Corner','1827 Fojia','Tunis','5285.00','5000.00','35');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('462','Bergains Galore','3829 Central','Klang','3412.00','10000.00','65'
);
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('524','klines','838 Ridge Central','Tripoli','12762.00','15000.00','20')
;
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('608','Uncle Don','321 Nizra','Kuching','2100.00','10000.00','65');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('687','Lees Conner','213 West','Penang','2851.00','5000.00','35');
Query OK, 1 row affected (0.05 sec)
mysql> select*
-> from Customer;
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
| Cust_Num | Cust_Name | Street | City | Balance | Credit
_Limit | Rep_Num |
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
| 148 | Hot Sports Center | 2115 Jln Mansoor | Kangar | 6550.00 | 7
500.00 | 20 |
| 282 | Panas Direct | 3827 Nawawi | Kuching | 431.54 | 10
000.00 | 35 |
| 356 | Fergusons | 482 WildWest | Delhi | 5785.00 | 7
500.00 | 65 |
| 408 | Everyone Corner | 1827 Fojia | Tunis | 5285.00 | 5
000.00 | 35 |
| 462 | Bergains Galore | 3829 Central | Klang | 3412.00 | 10
000.00 | 65 |
| 524 | klines | 838 Ridge Central | Tripoli | 12762.00 | 15
000.00 | 20 |
| 608 | Uncle Don | 321 Nizra | Kuching | 2100.00 | 10
000.00 | 65 |
| 687 | Lees Conner | 213 West | Penang | 2851.00 | 5
000.00 | 35 |
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
8 rows in set (0.00 sec)
mysql> create table Orders
-> (Order_Num char(5) primary key,
-> Order_Date DATE,
-> Cust_Num char(3));
Query OK, 0 rows affected (0.06 sec)
mysql> insert into Orders values
-> ('21608','2008-09-20','148');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21610','2008-09-20','356');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21613','2008-09-21','408');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Orders values
-> ('21614','2008-09-21','282');
Query OK, 1 row affected (0.02 sec)
mysql> insert into Orders values
-> ('21617','2008-09-23','608');
Query OK, 1 row affected (0.01 sec)
mysql> insert into Orders values
-> ('21619','2008-09-23','148');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21623','2008-09-23','608');
Query OK, 1 row affected (0.03 sec)
mysql> select*
-> from Orders;
+-----------+------------+----------+
| Order_Num | Order_Date | Cust_Num |
+-----------+------------+----------+
| 21608 | 2008-09-20 | 148 |
| 21610 | 2008-09-20 | 356 |
| 21613 | 2008-09-21 | 408 |
| 21614 | 2008-09-21 | 282 |
| 21617 | 2008-09-23 | 608 |
| 21619 | 2008-09-23 | 148 |
| 21623 | 2008-09-23 | 608 |
+-----------+------------+----------+
7 rows in set (0.00 sec)
mysql> select C.Cust_Num, O.Order_num, Order_Date from Customer C, Orders O wher
e C.Cust_Num=O.Cust_Num;
+----------+-----------+------------+
| Cust_Num | Order_num | Order_Date |
+----------+-----------+------------+
| 148 | 21608 | 2008-09-20 |
| 356 | 21610 | 2008-09-20 |
| 408 | 21613 | 2008-09-21 |
| 282 | 21614 | 2008-09-21 |
| 608 | 21617 | 2008-09-23 |
| 148 | 21619 | 2008-09-23 |
| 608 | 21623 | 2008-09-23 |
+----------+-----------+------------+
7 rows in set (0.00 sec)
mysql> select C.Cust_Num,Cust_Name,O.Order_Num,Order_Date from Customer C,Orders
O where C.Cust_Num=O.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
7 rows in set (0.00 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer INN
ER JOIN ORDERS ON Customer.Cust_Num=Orders.Cust_Num ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
+----------+-------------------+-----------+------------+
7 rows in set (0.03 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer LEF
T JOIN ORDERS ON Customer.Cust_Num=Orders.Cust_Num ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 462 | Bergains Galore | NULL | NULL |
| 524 | klines | NULL | NULL |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 687 | Lees Conner | NULL | NULL |
+----------+-------------------+-----------+------------+
10 rows in set (0.01 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer,Ord
ers;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21610 | 2008-09-20 |
| 148 | Hot Sports Center | 21613 | 2008-09-21 |
| 148 | Hot Sports Center | 21614 | 2008-09-21 |
| 148 | Hot Sports Center | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 148 | Hot Sports Center | 21623 | 2008-09-23 |
| 282 | Panas Direct | 21608 | 2008-09-20 |
| 282 | Panas Direct | 21610 | 2008-09-20 |
| 282 | Panas Direct | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 282 | Panas Direct | 21617 | 2008-09-23 |
| 282 | Panas Direct | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21623 | 2008-09-23 |
| 356 | Fergusons | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 356 | Fergusons | 21613 | 2008-09-21 |
| 356 | Fergusons | 21614 | 2008-09-21 |
| 356 | Fergusons | 21617 | 2008-09-23 |
| 356 | Fergusons | 21619 | 2008-09-23 |
| 356 | Fergusons | 21623 | 2008-09-23 |
| 408 | Everyone Corner | 21608 | 2008-09-20 |
| 408 | Everyone Corner | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 408 | Everyone Corner | 21614 | 2008-09-21 |
| 408 | Everyone Corner | 21617 | 2008-09-23 |
| 408 | Everyone Corner | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21623 | 2008-09-23 |
| 462 | Bergains Galore | 21608 | 2008-09-20 |
| 462 | Bergains Galore | 21610 | 2008-09-20 |
| 462 | Bergains Galore | 21613 | 2008-09-21 |
| 462 | Bergains Galore | 21614 | 2008-09-21 |
| 462 | Bergains Galore | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21619 | 2008-09-23 |
| 462 | Bergains Galore | 21623 | 2008-09-23 |
| 524 | klines | 21608 | 2008-09-20 |
| 524 | klines | 21610 | 2008-09-20 |
| 524 | klines | 21613 | 2008-09-21 |
| 524 | klines | 21614 | 2008-09-21 |
| 524 | klines | 21617 | 2008-09-23 |
| 524 | klines | 21619 | 2008-09-23 |
| 524 | klines | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21608 | 2008-09-20 |
| 608 | Uncle Don | 21610 | 2008-09-20 |
| 608 | Uncle Don | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 687 | Lees Conner | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21610 | 2008-09-20 |
| 687 | Lees Conner | 21613 | 2008-09-21 |
| 687 | Lees Conner | 21614 | 2008-09-21 |
| 687 | Lees Conner | 21617 | 2008-09-23 |
| 687 | Lees Conner | 21619 | 2008-09-23 |
| 687 | Lees Conner | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
56 rows in set (0.06 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer,Ord
ers ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21610 | 2008-09-20 |
| 148 | Hot Sports Center | 21613 | 2008-09-21 |
| 148 | Hot Sports Center | 21614 | 2008-09-21 |
| 148 | Hot Sports Center | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 148 | Hot Sports Center | 21623 | 2008-09-23 |
| 282 | Panas Direct | 21608 | 2008-09-20 |
| 282 | Panas Direct | 21610 | 2008-09-20 |
| 282 | Panas Direct | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 282 | Panas Direct | 21617 | 2008-09-23 |
| 282 | Panas Direct | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21623 | 2008-09-23 |
| 356 | Fergusons | 21623 | 2008-09-23 |
| 356 | Fergusons | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 356 | Fergusons | 21613 | 2008-09-21 |
| 356 | Fergusons | 21614 | 2008-09-21 |
| 356 | Fergusons | 21617 | 2008-09-23 |
| 356 | Fergusons | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21623 | 2008-09-23 |
| 408 | Everyone Corner | 21608 | 2008-09-20 |
| 408 | Everyone Corner | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 408 | Everyone Corner | 21614 | 2008-09-21 |
| 408 | Everyone Corner | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21619 | 2008-09-23 |
| 462 | Bergains Galore | 21623 | 2008-09-23 |
| 462 | Bergains Galore | 21608 | 2008-09-20 |
| 462 | Bergains Galore | 21610 | 2008-09-20 |
| 462 | Bergains Galore | 21613 | 2008-09-21 |
| 462 | Bergains Galore | 21614 | 2008-09-21 |
| 524 | klines | 21614 | 2008-09-21 |
| 524 | klines | 21617 | 2008-09-23 |
| 524 | klines | 21619 | 2008-09-23 |
| 524 | klines | 21623 | 2008-09-23 |
| 524 | klines | 21608 | 2008-09-20 |
| 524 | klines | 21610 | 2008-09-20 |
| 524 | klines | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21610 | 2008-09-20 |
| 608 | Uncle Don | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21610 | 2008-09-20 |
| 687 | Lees Conner | 21613 | 2008-09-21 |
| 687 | Lees Conner | 21614 | 2008-09-21 |
| 687 | Lees Conner | 21617 | 2008-09-23 |
| 687 | Lees Conner | 21619 | 2008-09-23 |
| 687 | Lees Conner | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
56 rows in set (0.01 sec)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.37-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database Customer;
Query OK, 1 row affected (0.00 sec)
mysql> use Customer;
Database changed
mysql> create table Customer
-> (Cust_Num char(3) primary key,
-> Cust_Name char(20),
-> Street char(25),
-> City char(15),
-> Balance decimal(8,2),
-> Credit_Limit decimal(8,2),
-> Rep_Num char(3));
Query OK, 0 rows affected (0.13 sec)
mysql> insert into Customer values
-> ('148','Hot Sports Center','2115 Jln Mansoor','Kangar','6550.00','7500.00
','20');
Query OK, 1 row affected (0.06 sec)
mysql> insert into Customer values
-> ('282','Panas Direct','3827 Nawawi','Kuching','431.540','10000.00','35');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('356','Fergusons','482 WildWest','Delhi','5785.00','7500.00','65');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('408','Everyone Corner','1827 Fojia','Tunis','5285.00','5000.00','35');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('462','Bergains Galore','3829 Central','Klang','3412.00','10000.00','65'
);
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('524','klines','838 Ridge Central','Tripoli','12762.00','15000.00','20')
;
Query OK, 1 row affected (0.03 sec)
mysql> insert into Customer values
-> ('608','Uncle Don','321 Nizra','Kuching','2100.00','10000.00','65');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Customer values
-> ('687','Lees Conner','213 West','Penang','2851.00','5000.00','35');
Query OK, 1 row affected (0.05 sec)
mysql> select*
-> from Customer;
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
| Cust_Num | Cust_Name | Street | City | Balance | Credit
_Limit | Rep_Num |
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
| 148 | Hot Sports Center | 2115 Jln Mansoor | Kangar | 6550.00 | 7
500.00 | 20 |
| 282 | Panas Direct | 3827 Nawawi | Kuching | 431.54 | 10
000.00 | 35 |
| 356 | Fergusons | 482 WildWest | Delhi | 5785.00 | 7
500.00 | 65 |
| 408 | Everyone Corner | 1827 Fojia | Tunis | 5285.00 | 5
000.00 | 35 |
| 462 | Bergains Galore | 3829 Central | Klang | 3412.00 | 10
000.00 | 65 |
| 524 | klines | 838 Ridge Central | Tripoli | 12762.00 | 15
000.00 | 20 |
| 608 | Uncle Don | 321 Nizra | Kuching | 2100.00 | 10
000.00 | 65 |
| 687 | Lees Conner | 213 West | Penang | 2851.00 | 5
000.00 | 35 |
+----------+-------------------+-------------------+---------+----------+-------
-------+---------+
8 rows in set (0.00 sec)
mysql> create table Orders
-> (Order_Num char(5) primary key,
-> Order_Date DATE,
-> Cust_Num char(3));
Query OK, 0 rows affected (0.06 sec)
mysql> insert into Orders values
-> ('21608','2008-09-20','148');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21610','2008-09-20','356');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21613','2008-09-21','408');
Query OK, 1 row affected (0.05 sec)
mysql> insert into Orders values
-> ('21614','2008-09-21','282');
Query OK, 1 row affected (0.02 sec)
mysql> insert into Orders values
-> ('21617','2008-09-23','608');
Query OK, 1 row affected (0.01 sec)
mysql> insert into Orders values
-> ('21619','2008-09-23','148');
Query OK, 1 row affected (0.03 sec)
mysql> insert into Orders values
-> ('21623','2008-09-23','608');
Query OK, 1 row affected (0.03 sec)
mysql> select*
-> from Orders;
+-----------+------------+----------+
| Order_Num | Order_Date | Cust_Num |
+-----------+------------+----------+
| 21608 | 2008-09-20 | 148 |
| 21610 | 2008-09-20 | 356 |
| 21613 | 2008-09-21 | 408 |
| 21614 | 2008-09-21 | 282 |
| 21617 | 2008-09-23 | 608 |
| 21619 | 2008-09-23 | 148 |
| 21623 | 2008-09-23 | 608 |
+-----------+------------+----------+
7 rows in set (0.00 sec)
mysql> select C.Cust_Num, O.Order_num, Order_Date from Customer C, Orders O wher
e C.Cust_Num=O.Cust_Num;
+----------+-----------+------------+
| Cust_Num | Order_num | Order_Date |
+----------+-----------+------------+
| 148 | 21608 | 2008-09-20 |
| 356 | 21610 | 2008-09-20 |
| 408 | 21613 | 2008-09-21 |
| 282 | 21614 | 2008-09-21 |
| 608 | 21617 | 2008-09-23 |
| 148 | 21619 | 2008-09-23 |
| 608 | 21623 | 2008-09-23 |
+----------+-----------+------------+
7 rows in set (0.00 sec)
mysql> select C.Cust_Num,Cust_Name,O.Order_Num,Order_Date from Customer C,Orders
O where C.Cust_Num=O.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
7 rows in set (0.00 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer INN
ER JOIN ORDERS ON Customer.Cust_Num=Orders.Cust_Num ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
+----------+-------------------+-----------+------------+
7 rows in set (0.03 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer LEF
T JOIN ORDERS ON Customer.Cust_Num=Orders.Cust_Num ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 462 | Bergains Galore | NULL | NULL |
| 524 | klines | NULL | NULL |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 687 | Lees Conner | NULL | NULL |
+----------+-------------------+-----------+------------+
10 rows in set (0.01 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer,Ord
ers;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21610 | 2008-09-20 |
| 148 | Hot Sports Center | 21613 | 2008-09-21 |
| 148 | Hot Sports Center | 21614 | 2008-09-21 |
| 148 | Hot Sports Center | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 148 | Hot Sports Center | 21623 | 2008-09-23 |
| 282 | Panas Direct | 21608 | 2008-09-20 |
| 282 | Panas Direct | 21610 | 2008-09-20 |
| 282 | Panas Direct | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 282 | Panas Direct | 21617 | 2008-09-23 |
| 282 | Panas Direct | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21623 | 2008-09-23 |
| 356 | Fergusons | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 356 | Fergusons | 21613 | 2008-09-21 |
| 356 | Fergusons | 21614 | 2008-09-21 |
| 356 | Fergusons | 21617 | 2008-09-23 |
| 356 | Fergusons | 21619 | 2008-09-23 |
| 356 | Fergusons | 21623 | 2008-09-23 |
| 408 | Everyone Corner | 21608 | 2008-09-20 |
| 408 | Everyone Corner | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 408 | Everyone Corner | 21614 | 2008-09-21 |
| 408 | Everyone Corner | 21617 | 2008-09-23 |
| 408 | Everyone Corner | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21623 | 2008-09-23 |
| 462 | Bergains Galore | 21608 | 2008-09-20 |
| 462 | Bergains Galore | 21610 | 2008-09-20 |
| 462 | Bergains Galore | 21613 | 2008-09-21 |
| 462 | Bergains Galore | 21614 | 2008-09-21 |
| 462 | Bergains Galore | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21619 | 2008-09-23 |
| 462 | Bergains Galore | 21623 | 2008-09-23 |
| 524 | klines | 21608 | 2008-09-20 |
| 524 | klines | 21610 | 2008-09-20 |
| 524 | klines | 21613 | 2008-09-21 |
| 524 | klines | 21614 | 2008-09-21 |
| 524 | klines | 21617 | 2008-09-23 |
| 524 | klines | 21619 | 2008-09-23 |
| 524 | klines | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21608 | 2008-09-20 |
| 608 | Uncle Don | 21610 | 2008-09-20 |
| 608 | Uncle Don | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 687 | Lees Conner | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21610 | 2008-09-20 |
| 687 | Lees Conner | 21613 | 2008-09-21 |
| 687 | Lees Conner | 21614 | 2008-09-21 |
| 687 | Lees Conner | 21617 | 2008-09-23 |
| 687 | Lees Conner | 21619 | 2008-09-23 |
| 687 | Lees Conner | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
56 rows in set (0.06 sec)
mysql> select Customer.Cust_Num,Cust_Name,Order_Num,Order_Date from Customer,Ord
ers ORDER BY Customer.Cust_Num;
+----------+-------------------+-----------+------------+
| Cust_Num | Cust_Name | Order_Num | Order_Date |
+----------+-------------------+-----------+------------+
| 148 | Hot Sports Center | 21608 | 2008-09-20 |
| 148 | Hot Sports Center | 21610 | 2008-09-20 |
| 148 | Hot Sports Center | 21613 | 2008-09-21 |
| 148 | Hot Sports Center | 21614 | 2008-09-21 |
| 148 | Hot Sports Center | 21617 | 2008-09-23 |
| 148 | Hot Sports Center | 21619 | 2008-09-23 |
| 148 | Hot Sports Center | 21623 | 2008-09-23 |
| 282 | Panas Direct | 21608 | 2008-09-20 |
| 282 | Panas Direct | 21610 | 2008-09-20 |
| 282 | Panas Direct | 21613 | 2008-09-21 |
| 282 | Panas Direct | 21614 | 2008-09-21 |
| 282 | Panas Direct | 21617 | 2008-09-23 |
| 282 | Panas Direct | 21619 | 2008-09-23 |
| 282 | Panas Direct | 21623 | 2008-09-23 |
| 356 | Fergusons | 21623 | 2008-09-23 |
| 356 | Fergusons | 21608 | 2008-09-20 |
| 356 | Fergusons | 21610 | 2008-09-20 |
| 356 | Fergusons | 21613 | 2008-09-21 |
| 356 | Fergusons | 21614 | 2008-09-21 |
| 356 | Fergusons | 21617 | 2008-09-23 |
| 356 | Fergusons | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21619 | 2008-09-23 |
| 408 | Everyone Corner | 21623 | 2008-09-23 |
| 408 | Everyone Corner | 21608 | 2008-09-20 |
| 408 | Everyone Corner | 21610 | 2008-09-20 |
| 408 | Everyone Corner | 21613 | 2008-09-21 |
| 408 | Everyone Corner | 21614 | 2008-09-21 |
| 408 | Everyone Corner | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21617 | 2008-09-23 |
| 462 | Bergains Galore | 21619 | 2008-09-23 |
| 462 | Bergains Galore | 21623 | 2008-09-23 |
| 462 | Bergains Galore | 21608 | 2008-09-20 |
| 462 | Bergains Galore | 21610 | 2008-09-20 |
| 462 | Bergains Galore | 21613 | 2008-09-21 |
| 462 | Bergains Galore | 21614 | 2008-09-21 |
| 524 | klines | 21614 | 2008-09-21 |
| 524 | klines | 21617 | 2008-09-23 |
| 524 | klines | 21619 | 2008-09-23 |
| 524 | klines | 21623 | 2008-09-23 |
| 524 | klines | 21608 | 2008-09-20 |
| 524 | klines | 21610 | 2008-09-20 |
| 524 | klines | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21610 | 2008-09-20 |
| 608 | Uncle Don | 21613 | 2008-09-21 |
| 608 | Uncle Don | 21614 | 2008-09-21 |
| 608 | Uncle Don | 21617 | 2008-09-23 |
| 608 | Uncle Don | 21619 | 2008-09-23 |
| 608 | Uncle Don | 21623 | 2008-09-23 |
| 608 | Uncle Don | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21608 | 2008-09-20 |
| 687 | Lees Conner | 21610 | 2008-09-20 |
| 687 | Lees Conner | 21613 | 2008-09-21 |
| 687 | Lees Conner | 21614 | 2008-09-21 |
| 687 | Lees Conner | 21617 | 2008-09-23 |
| 687 | Lees Conner | 21619 | 2008-09-23 |
| 687 | Lees Conner | 21623 | 2008-09-23 |
+----------+-------------------+-----------+------------+
56 rows in set (0.01 sec)
Database - mysql queries -part11
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database custRepsystem;
Query OK, 1 row affected (0.03 sec)
mysql> use custRepsystem;
Database changed
mysql> create table customer (cust_num char(8) primary key,cust_name char(20) no
t null,street char(20),city char(20),balance decimal(8,2)not null ,credit_limit
decimal(8,2) not null ,rep_num char(3));
Query OK, 0 rows affected (0.17 sec)
mysql> create table rep(rep_num char(3) primary key not null,
not null,first_name char(20) not null,street char(20),city char(20));
Query OK, 0 rows affected (0.06 sec)
mysql> insert into customer
-> values('148','hot sports center','2115 jln mansoor','kangar','6555.00','7
500.00','20');
Query OK, 1 row affected (0.14 sec)
mysql> insert into customer
-> values('282','panas direct','3827 nawawi','kuching','4315.40','10000.00',
'35');
Query OK, 1 row affected (0.02 sec)
mysql> insert into customer
-> values('356','fergusons','482 wildwest','delhi','5785.00','7500.00','65'
);
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('409','everyone corner','1827 fojia','tunis','5285.00','5000.00','
35');
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('462','bargains galore','3829 central','klang','3412.00','10000.00
','65');
Query OK, 1 row affected (0.01 sec)
mysql> insert into customer
-> values('524','klines','838 ridge','tripoli','12762.00','15000.00','20');
Query OK, 1 row affected (0.01 sec)
mysql> insert into customer
-> values('608','uncle don','321 nizra','kuching','2100.00','10000.00','65')
;
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('687','lees corner','213 west','penang','2851.00','5000.00','35');
Query OK, 1 row affected (0.03 sec)
mysql> select * from customer;
+----------+-------------------+------------------+---------+----------+--------
------+---------+
| cust_num | cust_name | street | city | balance | credit_
limit | rep_num |
+----------+-------------------+------------------+---------+----------+--------
------+---------+
| 148 | hot sports center | 2115 jln mansoor | kangar | 6555.00 | 75
00.00 | 20 |
| 282 | panas direct | 3827 nawawi | kuching | 4315.40 | 100
00.00 | 35 |
| 356 | fergusons | 482 wildwest | delhi | 5785.00 | 75
00.00 | 65 |
| 409 | everyone corner | 1827 fojia | tunis | 5285.00 | 50
00.00 | 35 |
| 462 | bargains galore | 3829 central | klang | 3412.00 | 100
00.00 | 65 |
| 524 | klines | 838 ridge | tripoli | 12762.00 | 150
00.00 | 20 |
| 608 | uncle don | 321 nizra | kuching | 2100.00 | 100
00.00 | 65 |
| 687 | lees corner | 213 west | penang | 2851.00 | 50
00.00 | 35 |
+----------+-------------------+------------------+---------+----------+--------
------+---------+
8 rows in set (0.06 sec)
mysql> insert into rep
-> values('20','mohd','zambri','621 telawi','kuantan');
Query OK, 1 row affected (0.05 sec)
mysql> insert into rep
-> values('35','fuad','razi','532 mansoor','kangar');
Query OK, 1 row affected (0.02 sec)
mysql> insert into rep
-> values('65','perez','ali','1625 taylor','johor');
Query OK, 1 row affected (0.02 sec)
mysql> select * from rep;
+---------+-----------+------------+-------------+---------+
| rep_num | last_name | first_name | street | city |
+---------+-----------+------------+-------------+---------+
| 20 | mohd | zambri | 621 telawi | kuantan |
| 35 | fuad | razi | 532 mansoor | kangar |
| 65 | perez | ali | 1625 taylor | johor |
+---------+-----------+------------+-------------+---------+
3 rows in set (0.00 sec)
mysql> select cust_num,cust_name,first_name,rep.rep_num from customer,rep where
(customer.rep_num=rep.rep_num);
+----------+-------------------+------------+---------+
| cust_num | cust_name | first_name | rep_num |
+----------+-------------------+------------+---------+
| 148 | hot sports center | zambri | 20 |
| 282 | panas direct | razi | 35 |
| 356 | fergusons | ali | 65 |
| 409 | everyone corner | razi | 35 |
| 462 | bargains galore | ali | 65 |
| 524 | klines | zambri | 20 |
| 608 | uncle don | ali | 65 |
| 687 | lees corner | razi | 35 |
+----------+-------------------+------------+---------+
8 rows in set (0.03 sec)
mysql> select cust_num,cust_name,balance,first_name,rep.rep_num from customer,re
p where (customer.rep_num=rep.rep_num);
+----------+-------------------+----------+------------+---------+
| cust_num | cust_name | balance | first_name | rep_num |
+----------+-------------------+----------+------------+---------+
| 148 | hot sports center | 6555.00 | zambri | 20 |
| 282 | panas direct | 4315.40 | razi | 35 |
| 356 | fergusons | 5785.00 | ali | 65 |
| 409 | everyone corner | 5285.00 | razi | 35 |
| 462 | bargains galore | 3412.00 | ali | 65 |
| 524 | klines | 12762.00 | zambri | 20 |
| 608 | uncle don | 2100.00 | ali | 65 |
| 687 | lees corner | 2851.00 | razi | 35 |
+----------+-------------------+----------+------------+---------+
8 rows in set (0.00 sec)
mysql> select cust_num,cust_name,credit_limit,first_name,rep.rep_num,rep.city fr
om customer,rep where (customer.rep_num=rep.rep_num);
+----------+-------------------+--------------+------------+---------+---------+
| cust_num | cust_name | credit_limit | first_name | rep_num | city |
+----------+-------------------+--------------+------------+---------+---------+
| 148 | hot sports center | 7500.00 | zambri | 20 | kuantan |
| 282 | panas direct | 10000.00 | razi | 35 | kangar |
| 356 | fergusons | 75000.00 | ali | 65 | johor |
| 409 | everyone corner | 5000.00 | razi | 35 | kangar |
| 462 | bargains galore | 10000.00 | ali | 65 | johor |
| 524 | klines | 15000.00 | zambri | 20 | kuantan |
| 608 | uncle don | 10000.00 | ali | 65 | johor |
| 687 | lees corner | 5000.00 | razi | 35 | kangar |
+----------+-------------------+--------------+------------+---------+---------+
8 rows in set (0.00 sec)
mysql> select cust_num,cust_name,first_name,rep.rep_num from customer,rep where
customer.rep_num=rep.rep_num AND credit_limit='7500.00';
+----------+-------------------+------------+---------+
| cust_num | cust_name | first_name | rep_num |
+----------+-------------------+------------+---------+
| 148 | hot sports center | zambri | 20 |
| 356 | fergusons | ali | 65 |
+----------+-------------------+------------+---------+
2 rows in set (0.00 sec)
mysql>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database custRepsystem;
Query OK, 1 row affected (0.03 sec)
mysql> use custRepsystem;
Database changed
mysql> create table customer (cust_num char(8) primary key,cust_name char(20) no
t null,street char(20),city char(20),balance decimal(8,2)not null ,credit_limit
decimal(8,2) not null ,rep_num char(3));
Query OK, 0 rows affected (0.17 sec)
mysql> create table rep(rep_num char(3) primary key not null,
not null,first_name char(20) not null,street char(20),city char(20));
Query OK, 0 rows affected (0.06 sec)
mysql> insert into customer
-> values('148','hot sports center','2115 jln mansoor','kangar','6555.00','7
500.00','20');
Query OK, 1 row affected (0.14 sec)
mysql> insert into customer
-> values('282','panas direct','3827 nawawi','kuching','4315.40','10000.00',
'35');
Query OK, 1 row affected (0.02 sec)
mysql> insert into customer
-> values('356','fergusons','482 wildwest','delhi','5785.00','7500.00','65'
);
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('409','everyone corner','1827 fojia','tunis','5285.00','5000.00','
35');
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('462','bargains galore','3829 central','klang','3412.00','10000.00
','65');
Query OK, 1 row affected (0.01 sec)
mysql> insert into customer
-> values('524','klines','838 ridge','tripoli','12762.00','15000.00','20');
Query OK, 1 row affected (0.01 sec)
mysql> insert into customer
-> values('608','uncle don','321 nizra','kuching','2100.00','10000.00','65')
;
Query OK, 1 row affected (0.03 sec)
mysql> insert into customer
-> values('687','lees corner','213 west','penang','2851.00','5000.00','35');
Query OK, 1 row affected (0.03 sec)
mysql> select * from customer;
+----------+-------------------+------------------+---------+----------+--------
------+---------+
| cust_num | cust_name | street | city | balance | credit_
limit | rep_num |
+----------+-------------------+------------------+---------+----------+--------
------+---------+
| 148 | hot sports center | 2115 jln mansoor | kangar | 6555.00 | 75
00.00 | 20 |
| 282 | panas direct | 3827 nawawi | kuching | 4315.40 | 100
00.00 | 35 |
| 356 | fergusons | 482 wildwest | delhi | 5785.00 | 75
00.00 | 65 |
| 409 | everyone corner | 1827 fojia | tunis | 5285.00 | 50
00.00 | 35 |
| 462 | bargains galore | 3829 central | klang | 3412.00 | 100
00.00 | 65 |
| 524 | klines | 838 ridge | tripoli | 12762.00 | 150
00.00 | 20 |
| 608 | uncle don | 321 nizra | kuching | 2100.00 | 100
00.00 | 65 |
| 687 | lees corner | 213 west | penang | 2851.00 | 50
00.00 | 35 |
+----------+-------------------+------------------+---------+----------+--------
------+---------+
8 rows in set (0.06 sec)
mysql> insert into rep
-> values('20','mohd','zambri','621 telawi','kuantan');
Query OK, 1 row affected (0.05 sec)
mysql> insert into rep
-> values('35','fuad','razi','532 mansoor','kangar');
Query OK, 1 row affected (0.02 sec)
mysql> insert into rep
-> values('65','perez','ali','1625 taylor','johor');
Query OK, 1 row affected (0.02 sec)
mysql> select * from rep;
+---------+-----------+------------+-------------+---------+
| rep_num | last_name | first_name | street | city |
+---------+-----------+------------+-------------+---------+
| 20 | mohd | zambri | 621 telawi | kuantan |
| 35 | fuad | razi | 532 mansoor | kangar |
| 65 | perez | ali | 1625 taylor | johor |
+---------+-----------+------------+-------------+---------+
3 rows in set (0.00 sec)
mysql> select cust_num,cust_name,first_name,rep.rep_num from customer,rep where
(customer.rep_num=rep.rep_num);
+----------+-------------------+------------+---------+
| cust_num | cust_name | first_name | rep_num |
+----------+-------------------+------------+---------+
| 148 | hot sports center | zambri | 20 |
| 282 | panas direct | razi | 35 |
| 356 | fergusons | ali | 65 |
| 409 | everyone corner | razi | 35 |
| 462 | bargains galore | ali | 65 |
| 524 | klines | zambri | 20 |
| 608 | uncle don | ali | 65 |
| 687 | lees corner | razi | 35 |
+----------+-------------------+------------+---------+
8 rows in set (0.03 sec)
mysql> select cust_num,cust_name,balance,first_name,rep.rep_num from customer,re
p where (customer.rep_num=rep.rep_num);
+----------+-------------------+----------+------------+---------+
| cust_num | cust_name | balance | first_name | rep_num |
+----------+-------------------+----------+------------+---------+
| 148 | hot sports center | 6555.00 | zambri | 20 |
| 282 | panas direct | 4315.40 | razi | 35 |
| 356 | fergusons | 5785.00 | ali | 65 |
| 409 | everyone corner | 5285.00 | razi | 35 |
| 462 | bargains galore | 3412.00 | ali | 65 |
| 524 | klines | 12762.00 | zambri | 20 |
| 608 | uncle don | 2100.00 | ali | 65 |
| 687 | lees corner | 2851.00 | razi | 35 |
+----------+-------------------+----------+------------+---------+
8 rows in set (0.00 sec)
mysql> select cust_num,cust_name,credit_limit,first_name,rep.rep_num,rep.city fr
om customer,rep where (customer.rep_num=rep.rep_num);
+----------+-------------------+--------------+------------+---------+---------+
| cust_num | cust_name | credit_limit | first_name | rep_num | city |
+----------+-------------------+--------------+------------+---------+---------+
| 148 | hot sports center | 7500.00 | zambri | 20 | kuantan |
| 282 | panas direct | 10000.00 | razi | 35 | kangar |
| 356 | fergusons | 75000.00 | ali | 65 | johor |
| 409 | everyone corner | 5000.00 | razi | 35 | kangar |
| 462 | bargains galore | 10000.00 | ali | 65 | johor |
| 524 | klines | 15000.00 | zambri | 20 | kuantan |
| 608 | uncle don | 10000.00 | ali | 65 | johor |
| 687 | lees corner | 5000.00 | razi | 35 | kangar |
+----------+-------------------+--------------+------------+---------+---------+
8 rows in set (0.00 sec)
mysql> select cust_num,cust_name,first_name,rep.rep_num from customer,rep where
customer.rep_num=rep.rep_num AND credit_limit='7500.00';
+----------+-------------------+------------+---------+
| cust_num | cust_name | first_name | rep_num |
+----------+-------------------+------------+---------+
| 148 | hot sports center | zambri | 20 |
| 356 | fergusons | ali | 65 |
+----------+-------------------+------------+---------+
2 rows in set (0.00 sec)
mysql>
Subscribe to:
Posts (Atom)




