Need up to 30 seconds to load.
welcome to my channel through this video
is about how you can make up a table in
sequel server okay so think about this
an annual where you want to update I
record in your table but before updating
you need to take a backup of your table
you know you have the option of taking
the full database backup but there if
there is a millions of records or you
know lots of records so it database size
would go to I think 200 to 500 M is all
much more so in that case it is not
sufficient to take backup each and every
time whenever you want to update a
record and your table so it is really
not efficient so in that case you will
really need to take a backup of your
table on which you're going to perform
any DML statements okay and so let's get
started I have the database here my cell
stack under which I have the table
called am underscore user master it
contains all the records of our user so
I will show you first what it contains
so select a strict from M under school
user master I just fire this query so I
have these three records in my table
right now okay now I have to update the
name Smith to George okay so what the
procedure is I have to update a record
so I have to you know fire the DML
statement but before you know firing any
DML statement including your update
delete okay so I have to take the backup
so for this you need to write select
hold on select is trick into your
temporary table name just in Mike is it
a stamp user master from M underscore
user
master okay so what does this query do
it will copy all the records from your
original table that is Amanda's could
use a master and copy these records into
the this table stamp user master so you
know along with copying all the records
it will automatically create a table
called tamp user master which has the
same schema as of M underscore who's a
master okay and this fire and show you
how it works
okay three rows affected it means all
the three records from my original table
has transferred or copied to this new
table so just a refresh here and you can
see the table has been created here is
your records okay now you can easily
perform any update query on your table
like I'm not dating update M underscore
user master set name equals to George
layer ID equals to two okay I just fire
this and show you now it has changed
okay now if I really get to know that
the query I have fired is wrong or
mistakenly I have given the name George
so you can always you have the safe
records on your table you can always
remodel this okay I just show you the
backup table records which is amp user
master
here is your old records okay Smith in
Smith and the new one is George so you
can again you know copy your additional
records in this case we know that we
have mistakenly gave the name Smith
George so we just need to recover Smith
but you know when there is a millions of
record you don't know you don't know
that the record has updated or what
mistakenly you have done to your
original table so in that case you will
really need a table backup this is all
about for today now for any specific
video what you want to see I'll just
just comment down in the comment section
below I'll just surely make the videos
on your demands okay thank you so much
for watching see you in my next video
till then bye