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
0
votes
2 answers

how to write a batch file, which runs a PL/SQL block, to tell me many records are inserted/deleted/etc. in a log file?

I have created two batch files to run two separate .sql file in Windows Task Scheduler. The batch file for both looks like this: sqlplus userid/password@database @C:\XXX.sql>>C:\output.log echo commit; | userid/password@database The first .sql file…
gcbm1984
  • 53
  • 1
  • 4
  • 9
0
votes
2 answers

Generating MySQL UPDATE statements containing BLOB image data

I'm trying to write an SQL statement that will generate an SQL script that will update a BLOB field with an IMAGE being selected from the database. This is what I have: select concat( 'UPDATE `IMAGE` SET THUMBNAIL = ', QUOTE(…
Bob
  • 513
  • 1
  • 6
  • 9
0
votes
0 answers

Copy on Write trigger

Can I count on the order of the special trigger tables, inserted and deleted, being the same? If not, how do I deal with insert statements that affect the identity column(s)? I have a production (main) database. I'm trying to set up a development…
Ethan Reesor
  • 2,090
  • 1
  • 23
  • 40
0
votes
2 answers

Loading DATA into mySQL via text File

I have created a table in mysql called person and am trying to load data into it using a text file. However, I have a restriction, I must load the data while checking if the SSN should be trimmed to an appropriate amount of characters. If the value…
John F.
  • 154
  • 1
  • 10
0
votes
1 answer

mysql issue when reading in Date type from .txt file with str_to_date

I have been given the task of reading in a .txt file into a mySQL table. Here is what I did. CREATE TABLE PERSON(PIDM INT, FNAME VARCHAR(20), LNAME VARCHAR(20), SSN INT(8), DOB DATE, GENDER CHAR(2)); LOAD DATA LOCAL INFILE '/pathtoTextFile' …
John F.
  • 154
  • 1
  • 10
0
votes
4 answers

Combine two select

I have the following table test +----+---------+------+ | Id | NumFact | type | +----+---------+------+ | 1 | 20 | A | | 2 | 21 | A | | 3 | 22 | A | | 4 | 23 | B | | 5 | 24 | B | | 6 | 25 | B |…
0
votes
1 answer

Data Manipulation through a function in PostgreSQL

For Example, CREATE TABLE tbl_products ( prod_id serial NOT NULL, prod_name text, prod_qty integer, prod_batch text, prod_group text ) and the data are INSERT INTO tbl_products(prod_name, prod_qty, prod_batch, prod_group)VALUES ('BIOTOR…
user3422859
0
votes
1 answer

running a script in Oracle application express SQL Scripts results in an error, but runs fine when ran in SQL command and SQLDeveloper

I get this error with this script (shown below) when I run it in oracle application express SQL Scripts, but not if ran in SQL command section of application express or in SQL Developer. Is there an explanation as to why? ORA-20001: Query must…
Steve Wold
  • 43
  • 8
0
votes
2 answers

Selecting actual length of field data rather field size

I have a scenario in which I have a table and there are two column in it. Create Table Temp ( _id INT, Name VARCHAR(2000) ) INSERT INTO Temp VALUES (1,'') INSERT INTO Temp VALUES (2,'Mike Terri') SELECT * FROM Temp When I select by using…
DareDevil
  • 5,249
  • 6
  • 50
  • 88
0
votes
3 answers

SQL DML Exercise 14

I have a problem I'm stuck on and I can't figure out how to get the correct query. So first off, this question is in reference to www.sql-ex.ru and its Exercise 10 in the DML section. Here is all the info: Short database description "Ships": The…
stilhead
  • 21
  • 2
0
votes
2 answers

How to implement a Definitive Media Library (ITIL DML)?

How to implement a Definitive Media Library (ITIL DML) ? I would like to know some way to implement a DML based on ITIL. Given a library of heterogeneous software the only solution that crosses my mind is to use a system file structure (with proper…
Gabriel Santos
  • 101
  • 1
  • 2
0
votes
2 answers

Oracle SQL, trying to get one value from a select/join to use to update one column in one table?

I have one table with the following columns: T_RESOLVED_DATE I_HOUSEHOLD_NUMBER I_RESOLVED_SET_NUMBER I_STATION_CODE I_RESOLVED_START_MIN I_DURATION I_PERSON_NUMBER I_COVIEW_DEMO_ID Initially, I_COVIEW_DEMO_ID is set to null. Then I have another…
Lani1234
  • 522
  • 5
  • 12
  • 21
0
votes
1 answer

Reversing order of results in START WITH LPAD SQL query

SELECT LPAD('*', 2*level-1)||SYS_CONNECT_BY_PATH(unit_data, '/') "battle_unit_id" FROM battle_units where connect_by_isleaf = 1 START WITH battle_unit_id= 600 CONNECT BY PRIOR parent_id = battle_unit_id; returns */F-16/Jet powered…
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107
0
votes
2 answers

Replacing a table value with the previous expression in oracle

Ok so I am having the following scenario I have a table called employees and have to replaced the last names for some of the people there under the following conditions: 1-The last name must be replaced only to those employees who work on…
0
votes
1 answer

SQL Server - SKIP DML statements from a given SQL Script file

I have a huge sql server script which has mix of ddl, dml operations and there is a requirement to create a clean db structure (with no data). Is it possible for a transaction to skip DML scripts through some parameter or some other way. Thanks in…
Arun
  • 1
  • 1