A doubt related to DML commands in DBMS.

Posted by A4u_6178 under Sql Server on 7/2/2011 | Points: 10 | Views : 1779 | Status : [Member] | Replies : 8
Hi all,

We all know that DML commands are Data manipulation commands in DBMS.
DML commands: used for data manipulations in database tables.
SELECT
DELETE
UPDATE
INSERT

why the SELECT Command is categorised into DML When We know that it is just used to select data from database table and no data manipulations involved..
ANY REASON......??

Thanks & Regards,


Responses

Posted by: Vforvijay on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
hi..
Its a good question...
See in select command not only we retrieve the data,also we are doing some manipulation by applying condition using Where clause
By applying limitation also one manipulation ....



A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vilasgite080 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
hi
DML : DATA MANIPULATION LANGUAGE contains Select, Delete, Update and Insert.
Select command have data retrieval power and does such data retrieves using Joins, by grouping and Subquries thats why Select command has part of DML in SQL. And think about Select Into statement, how it works? it works
how SELECT INTO STATEMENT WORKS: http://www.w3schools.com/sql/sql_select_into.asp
ALSO please refer:
http://theopensourcery.com/sqldml


A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A4u_6178 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hello,

Thanks for ur replies.
we are doing some manipulation by applying condition using Where clause to select..
is this true?? what ur saying is also a kind data retrival depending on condition(filter) again there is no manipulation done on database table..


Thanks & Regards,

A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vilasgite080 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
yeah!

A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A4u_6178 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
a good understanding of DML statements could be something like...

The DML statements INSERT,UPDATE and DELETE are action queries what i mean is when u execute these statements
u get a message as (1) rows effected this is actually a manipulation of database table.
and now select statement when executes returns records or a table. So we can call it as non action DML query.

Thanks & Regards,

A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vilasgite080 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hello... try to understand.. Select is also part of DML.
please try to run query and check ur database in sql. u got message 'rows affected' by Select Into. So, how can u said Select is non action query. and this query create backup of your table
SELECT *

INTO new_table_name
FROM old_tablename



A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A4u_6178 on: 7/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hello... U pls read my previous response nowhere i said select is not part of DML.
I jus said that its non action DML query.
The case which u have mentioned is an exception otherwise select returns a table.


Thanks & Regards,

A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vilasgite080 on: 7/3/2011 [Member] Starter | Points: 25

Up
0
Down
hi
i have not read about action and non action query for DML's command .


A4u_6178, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response