Skip to main content

SQL INSERT INTO SELECT Statement with Example

SQL INSERT INTO SELECT Statement

  • INSERT INTO SELECT copies data from one table to another table.
  • INSERT INTO SELECT requires that data types in source and target tables match

The SQL INSERT INTO SELECT syntax

The general syntax is:
  1. INSERT INTO table-name (column-names) SELECT column-names FROM table-name WHERE condition

SQL INSERT SELECT INTO Example

Comments

Popular posts from this blog

how to Install Numpy, Pandas and matplotlib on ubuntu 18.04 and Linux Mint

Install Python,NumPy,Matplotlib for Python 3 on Ubuntu 18.04, Linux Mint, Debian Linux.
This is a short article about installing Numpy, Pandas , Matplotlib, Python3 on the latest Ubuntu 18.04 LTS, Linux Mint, Debian Linux which comes with Python 3.6.5. Let’s start by making sure we have an updated system: 1 sudo apt update2 sudo apt upgrade
Now, let’s install NumPy,Pandas,Matplotlib :

sudo apt-get install python-pipsudo pip install numpysudo pip install pandassudo pip install matplotlibTest numpy :

Draw a Pie Chart using python Matplotlib

Draw a Pie Chart using python Matplotlib Code : import matplotlib.pyplot as plt

labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
sizes = [20, 35, 40, 150]
explode = (0, 0.1, 0, 0)
fig1, ax1 = plt.subplots()
ax1.pie(sizes, explode=explode, labels=labels, autopct='%1.1f%%',
        shadow=True, startangle=90)
ax1.axis('equal')

plt.show()
Output :

Java Socket Programming

To implement communication between Client and Server using the UDP protocol and datagrams

TServer
import java.net.*; import java.io.*; import java.util.*; public class TServer { public static void main(String[] args) throws Exception{ DatagramSocket ss = new DatagramSocket(1234); while(true){ System.out.println("Server is up...."); byte[] rd=new byte[100]; byte[] sd=new byte[100]; DatagramPacket rp = new DatagramPacket(rd,rd.length); ss.receive(rp); InetAddress ip= rp.getAddress(); int port=rp.getPort(); Date d=new Date(); // getting system time String time= d + ""; // converting it to String sd=time.getBytes(); // converting that String to byte System.out.println(port); System.out.println(ip); DatagramPacket sp=new DatagramPacket(sd,sd.length,ip,port); ss.send(sp); rp=null; System.out.println("Done !! "); } } }

TClient

import java.net.*; import java.io.*; public class TClient { public static void main(String[] args) throws Exception{ System.out.print…