I understand, is an extremely fundamental question, however i am along the way of re-learning sql saved methods, which is what happended:
I had been practicing with a few simple remove / place programs, when experienced with this particular: basically ONLY place records:
all is alright, i quickly call a remove procedure, passing the colum_ID to recognize the record and remove it.
This is accomplished properly and all sorts of is alright
I Quickly call a place procedure once more and also the place happens such as this:
5. lizard **this is wrong, right?**
As well as i remove allows say records 2 and three, and call the place technique of 2 new records, ir will "completeInch individuals positions and also the third record is going to be at the end, where it ought to be.
The saved methods are extremely fundamental: Place
USE [Test] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[InsertData] @name varchar(50), @lastname varchar(50) AS BEGIN SET NOCOUNT ON; insert into dbo.names (name,last_name) values(@name,@lastname) select * from dbo.names END
USE [Test] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[DeleteData] @id_record int AS BEGIN SET NOCOUNT ON; delete from dbo.names where id_record = @id_record SELECT * from dbo.names END
So, what's leading to this behavior, the table is extremely fundamental, but is compliant with Pkeys, not nulls, indexes, etc.
An order that rows are came back from the choose statement is arbitrary, unless of course you utilize an 'order by' clause.
Used, an order will be based upon the specific implementation that the DBMS uses, but you shouldn't think that an order is stable.