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
1 answer

Insert and update based on comparison of fields between two tables

I would like to Insert a record in a table if a variable is not equal the same column in another table. Something like: Insert IGNORE INTO newtable SELECT * FROM oldtable WHERE url="www.theurl.com/1" AND (field…
user1665355
  • 3,324
  • 8
  • 44
  • 84
0
votes
1 answer

Postgresql select min Date value

These are my tables: table: tickets ticketid: serial userid: integer dateticket: date timeticket: time table: users userid: serial username: varchar password: varchar These are my data: userid username password 1 user1 …
ivanjj22
  • 167
  • 1
  • 3
  • 12
0
votes
1 answer

Simultaneous DML operations on same table based on different where clause

Is it possible in SQl Server to run 3 jobs at the same time (say 3:00 am) which updates the same table? The updates have different where clause. What I wanted to know will the tables get deadlocked or each job will run independently of each other.…
user3453057
  • 55
  • 1
  • 8
0
votes
1 answer

How can I keep the relation between the Manager and the Server while the Manager has a relation to a reference?

On a project that enables the creation and management of calculation sheets, wherein each worksheet. It has an owner and two sets of users: those who can change the spreadsheet and those who can read the spreadsheet. Every cell in a spreadsheet can…
Francisco Maria Calisto
  • 2,841
  • 4
  • 22
  • 54
0
votes
1 answer

MySQL - Trigger before insert, only insert if col = another existing database name?

I have a database (database1) and a table imei_db(IMEI VARCHAR(15), db VARCHAR(40)). I also have other databases (ex: database2) and I want a trigger that, whe inserting a row on database1.imei_db, it verifies before the actual insert if there is a…
MagisterMundus
  • 335
  • 4
  • 18
0
votes
1 answer

how to evaluate table uniqueness without having a primary key

I try to find a way to analyze table uniqueness that doesn't have primary key defined. I try to find an approach without db server resource more like query/read only to be able to run uniqueness queries to find out the column or composite column…
dataminder
  • 31
  • 3
0
votes
2 answers

Append Characters using built-in formula while column fetch in SQL Server

I have been given a scenario that to select 4 characters from a given cell(the last 4) I am doing it manually by using Case expression. I need to automate it rather using Cases I have done this. SELECT CASE WHEN LEN(ticket_number) >= 4 THEN …
DareDevil
  • 5,249
  • 6
  • 50
  • 88
0
votes
2 answers

Oracle SQL spool giving incorrect information

The first ddl script I ran was telling me I had errors. Come to find out it was because I had spaces between my commands. I removed the spaces and it spools fine with no error messages in the spool file. Now, I am trying to insert data into the…
colobia
  • 43
  • 1
  • 5
0
votes
2 answers

Can I put update or create statements in from clause in DB2?

Can I use DML in from clause in DB2? thank you
derrdji
  • 12,661
  • 21
  • 68
  • 78
0
votes
1 answer

Import Column info from one table to another from non-unique identifier

I have two tables, Table A which holds the information I want to pass and Table B I want to accept the information. (19 columns of varchar). The only column they both hold common is "ItemTitle" (Don't ask, I didn't create it) So I am trying to…
Francis
  • 145
  • 1
  • 7
0
votes
0 answers

DML File 'enum' class Error

I am writing on a DML file the next source of code: enum Permission; It generate a file .java where it will generate this error: excepting "class", found 'enum' I also tried to code other sample of my DML file function as well as: enum…
Francisco Maria Calisto
  • 2,841
  • 4
  • 22
  • 54
0
votes
1 answer

Optimize SELF-JOIN in MySQL. Prompts "Lost Connection to MySQL server during Query"

The table organiseddata is designed as with ID as Primary key and using a secondary index caseindex on CaseID. The table contains about 5M rows and about 47000 unique CaseIDs. ID | CaseID | Actor | Activity 1 | Case1 | John | A 2 …
GvanJoic
  • 213
  • 2
  • 14
0
votes
2 answers

Combine queries in MySQL

I have two table in MySQL that looks as follows: ID Name Information 1 A fsdf 2 B ada 3 A dsafd 4 A retret 5 C asdfsa 6 B xzc and, P_ID Name Loc_X Loc_Y 1 A 2 3 2 B…
DotPi
  • 3,977
  • 6
  • 33
  • 53
0
votes
1 answer

How to prevent DDL, DCL, TCL commands in Oracle Query

Hi guys, I'm developing an application to perform SQL query's from ASP.NET in ORACLE and I want to get a list of all DDL, DCL, TCL reserved words to prevent changes to database. Maybe, ¿There is a database table in oracle with this list? like…
Faruck
  • 11
  • 3
0
votes
1 answer

Do multiple DML statements in one stored procedure cause a performance hit?

currently I am working with MSSQL server (either 2008R2 or 2012) and I'd like to ask if multiple DML statements put in one procedure can cause significant performance hit (drop)? As I was told, the rule of thumb here is to put each DML statement…
Emil
  • 306
  • 5
  • 16