Questions tagged [dml]

Data Manipulation Language(DML) is database syntax used for SQL commands, including the INSERT, UPDATE, and DELETE statements. DML triggers operate on INSERT, UPDATE, and DELETE statements, and help to enforce business rules and extend data integrity when data is modified in tables or views.

A data manipulation language (DML) is a family of syntax elements similar to a computer programming language used for inserting, deleting and updating data in a database. Performing read-only queries of data is sometimes also considered a component of DML.

A popular data manipulation language is that of Structured Query Language (SQL), which is used to retrieve and manipulate data in a relational database. Other forms of DML are those used by IMS/DLI, CODASYL databases, such as IDMS and others.

References:

DML related tags

539 questions
-1
votes
1 answer

merge statement for update and insert

I am trying to use merge to combine an update and insert statement, although i am getting some error and im not quite sure its right. The merge statement is within a stored proc. Following is the merge statement. MERGE dbo.seg AS TARGET USING…
Faiz
  • 273
  • 2
  • 7
  • 21
-2
votes
1 answer

MySQL, adding a new column to an already existing table, involves joins also

Q. Create a new column DaysTakenForDelivery that contains the date difference between Order_Date and Ship_Date. Tables available are: orders and shipping CREATE TABLE orders ( Order_ID int DEFAULT NULL, Order_Date text, Order_Priority…
RUBINA
  • 23
  • 5
-2
votes
1 answer

Audit of DML transactions in a table

I want to record any DML transaction happens in a table in a day into another table. I also want to record transaction with values. How is it possible in Oracle Database? I have been told not to use triggers because of its huge maintenance and also…
user14046507
-2
votes
1 answer

Is this DML or DDL trigger?

I wanted to ask if this is a DML or DDL Trigger ? CREATE OR REPLACE TRIGGER INFORMATION_TIMEZONE BEFORE INSERT ON information FOR EACH ROW BEGIN IF (session_params.getCurrentRefperso) IS NOT NULL THEN :new.DT_HOUR_TIME_ZONE :=…
-2
votes
1 answer

Trigger fo DML operations on view in SQL

I'm doing a triggers which do DML operations on view. There are two sample tables: Vehicle: vehicle_id, size, brand_id Brand: brand_id, name I created a view: CREATE OR REPLACE VIEW vehicle_view AS SELECT vehicle_id, size, brand.name FROM…
Jan Tikal
  • 3
  • 1
-2
votes
2 answers

In how many ways we can insert records in sql server

Like inserting single or multiple records at a time, one table data is inserting into another table with limited columns.
Swamy
  • 19
  • 6
-2
votes
2 answers

Auditing DML changes in Oracle

I want to log all tables changes in one table named Tables_History with one trigger for each table, and whithout addressing column names explicity, and according to the type of column. Because i have 50 tables that belonges to different projects.…
Mehran
  • 1
  • 1
-2
votes
1 answer

how to add +1 to code ' 001' and to the code ' 009 ' in PostgreSQL?

I'm trying to add +1 to code '001' but I get '2' and not ' 002 and +1 to code '009' but I get '10' and not '010'. Table: create table example ( code varchar(7), row1 varchar(10), row2 varchar(7), CONSTRAINT pk_code…
Python241820
  • 1,017
  • 1
  • 12
  • 16
-2
votes
1 answer

How to SQL DML - sql-ex.ru exercise 18

I have been working on this query for a couple of time I managed to find a solution but on the exercise solution itself it says I got the correct number of results but somethings missing. This is the exercise they propose. You should add from the…
-2
votes
2 answers

How to write this SQL query as per requirement

Consider the following schema of a company database (primary keys are in bold). Employee (**EmployeeID**, Name, Office, Email, Sex, Salary, DepartmentID) Department (**DepartmentID**, DepartmentName) Project (**ProjectID**, DepartmentID,…
David
  • 420
  • 2
  • 5
  • 18
-3
votes
8 answers

Rollback command not working - Oracle

I dropped a table and tried to rollback, but to no use. Will it ever work like this or am I playing wrong here? As from most of the comments I am clear that DDL statements cannot be undone by rollback but only by FLASHBACK. I tried undoing …
HalfWebDev
  • 7,022
  • 12
  • 65
  • 103
-3
votes
1 answer

Tracking DML activities on particular table

How to track all DML activity on a particular table in oracle database. I need to monitor it.
-3
votes
1 answer

MySQL Query in bad way

I have below query to check customer subscription. This is not quite right way to do in query but I do not know how to optimize or correct it. Here it is. SELECT sub_id FROM subscription WHERE start_date = CURDATE() AND end_date > CURDATE() AND…
CPMM
  • 76
  • 7
-3
votes
2 answers

sql dml exercise 19

I have been working on this query for a couple of time I managed to find a solution but on the exercise solution itself it says I got the correct number of results but mismatch. This is the exercise they propose: Assuming that no any two battles…
Ken Wu
  • 18
  • 1
1 2 3
35
36