1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GuDViN [60]
3 years ago
9

. Briefly describe an SQL DML statement for storing new data into a table.

Computers and Technology
1 answer:
STatiana [176]3 years ago
3 0

DML stands for Data Manipulation Language.

SQL DML statements consist of insert, update and delete statements.

Out of these three, insert is used to add new data to the table.

The update command modifies the existing data in the given table.

The delete command removes the data from the given table.

Syntax

INSERT INTO table_name ( column1, column2, …….. )

VALUES ( value1, value2, ……… )

The table_name represents the table in which data is to be inserted.

All the columns in the table_name need to be specified in the brackets in the insert into clause.

All the values in the values clause should correspond to the columns, both in the order in which the columns are mentioned and the data type of the values should match the respective column.

Example

Consider the table Person consisting of columns id, name, gender having data type integer, varchar and varchar, respectively.

In order to add data to all the columns of the Person table, the command is as follows.

Insert into Person ( id, name, gender )

Values ( 101, “Alexis”, “Male” );

In the above command, value is present for each column in the respective order. Also, the format of the data match the format of the columns.

Other versions of the insert command add data only to some columns in the table.

Insert into Person ( id, name )

Values ( 102, “Aayesha” );

The above command adds data only to two columns as mentioned.

Also, null value can be added using insert command.

Insert into Person ( id, name, gender )

Values ( 103, “Brainly dot com”, null );

Since null value appears at number three, the corresponding column to this value is also number three, i.e., gender column.

This inserts null value as the gender for Brainly dot com.

You might be interested in
Create a program that simulates a race between several vehicles. Design and implement an inheritance hierarchy that includes Veh
Amanda [17]

Answer:

Explanation:

The following program is written in Java. Since there was not much information provided in the question I created a Vehicle superclass with a couple of subclasses for the different types of vehicles (motorcycle, sedan, truck). Each one having its own unique attributes. The vehicle class also has an attribute for the position of the vehicle in the race.

class Vehicle {

   int year, wheels, position;

   public Vehicle(int year, int wheels, int position) {

       this.year = year;

       this.wheels = wheels;

       this.position = position;

   }

   public int getYear() {

       return year;

   }

   public void setYear(int year) {

       this.year = year;

   }

   public int getWheels() {

       return wheels;

   }

   public void setWheels(int wheels) {

       this.wheels = wheels;

   }

   public int getPosition() {

       return position;

   }

   public void setPosition(int position) {

       this.position = position;

   }

}

class Motorcycle extends Vehicle {

   String manufacturer;

   double speed;

   public Motorcycle(int year, int wheels, int position) {

       super(year, wheels, position);

   }

   public Motorcycle(int year, int wheels, int position, String manufacturer, double speed) {

       super(year, wheels, position);

       this.manufacturer = manufacturer;

       this.speed = speed;

   }

   public String getManufacturer() {

       return manufacturer;

   }

   public void setManufacturer(String manufacturer) {

       this.manufacturer = manufacturer;

   }

   public double getSpeed() {

       return speed;

   }

   public void setSpeed(double speed) {

       this.speed = speed;

   }

}

class Sedan extends Vehicle {

   int passengers;

   String manufacturer;

   double speed;

   public Sedan(int year, int wheels, int position) {

       super(year, wheels, position);

   }

   public Sedan(int year, int wheels, int position, int passengers, String manufacturer, double speed) {

       super(year, wheels, position);

       this.passengers = passengers;

       this.manufacturer = manufacturer;

       this.speed = speed;

   }

   public int getPassengers() {

       return passengers;

   }

   public void setPassengers(int passengers) {

       this.passengers = passengers;

   }

   public String getManufacturer() {

       return manufacturer;

   }

   public void setManufacturer(String manufacturer) {

       this.manufacturer = manufacturer;

   }

   public double getSpeed() {

       return speed;

   }

   public void setSpeed(double speed) {

       this.speed = speed;

   }

}

class Truck extends Vehicle {

   int passengers;

   String manufacturer;

   double speed;

   public Truck(int year, int wheels, int position) {

       super(year, wheels, position);

   }

   public Truck(int year, int wheels, int position, int passengers, String manufacturer, double speed) {

       super(year, wheels, position);

       this.passengers = passengers;

       this.manufacturer = manufacturer;

       this.speed = speed;

   }

   public int getPassengers() {

       return passengers;

   }

   public void setPassengers(int passengers) {

       this.passengers = passengers;

   }

   public String getManufacturer() {

       return manufacturer;

   }

   public void setManufacturer(String manufacturer) {

       this.manufacturer = manufacturer;

   }

   public double getSpeed() {

       return speed;

   }

   public void setSpeed(double speed) {

       this.speed = speed;

   }

}

6 0
3 years ago
How to make wrapped loops step by step?
diamong [38]

Answer:

what the heck? what kind of question is that

4 0
3 years ago
________ is typically used as the last string of letters in the name of a website. Group of answer choices the name of the indiv
Vilka [71]

Answer:

The answer is "the type of organization or country code".

Explanation:

The web site address is also known as URL, in which it contains many parts like, protocols, domain suffixes, and its country code, that uses the domain names to mark more than one IP address.  It also describes the top- domain on the Internet, which is usually used by the nation associated with country code, and wrong option can be described as follows:

  • It can't describes the name of the organization.
  • It can't use the programming language to create a web page.
  • It is not used to classify the security of web page.
8 0
3 years ago
PLEASE HELP ME!!!!
Delicious77 [7]

Answer:

Hi, when you downloaded it did you deny notifications? Are you on do not disturb? Try checking your notifications for that app specifically.

Explanation:

5 0
3 years ago
Read 2 more answers
A digital _ Is a good place for students to read an out of print book
bonufazy [111]

Answer:

Library

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • One example of how psychological research can be used to control harmful behavior would be __________. A. fooling individuals th
    13·2 answers
  • A friend of yours is having trouble getting good Internet service. He says his house is too remote for cable TV—he doesn’t even
    11·1 answer
  • What does a close observation of the painting reveal? the people's enjoyment of fishing as a pastime the people's reliance on th
    13·2 answers
  • On an unweighted scale, a grade of A is worth _____ points
    7·1 answer
  • Some designer suggest that speech recognition should be used in tale phone menu system. This will allow users to interact with t
    11·1 answer
  • Which term describes the distance from one point on a wave to the same point on the next wave?
    13·2 answers
  • Select the correct answer.
    9·2 answers
  • All banks follow the same guideline for determining if an applicant qualifies for a loan.
    13·1 answer
  • What is the sixth generation of style. When writing a paper.
    8·1 answer
  • _________ in online education refer(s) to how fairly the particular needs of particular groups of students are met.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!