Sunday, 25 February 2018

How to insert a variable value into a table in SQL

How to insert a variable value into a table in SQL

declare @x int;
set @x=100-1;


declare @z int=1000-1;
 

create table newt(b int, c varchar(10),a int, d varchar(20))
insert into newt values(10, 'san', @x, @z)
select * from newt 

 

 

1 comment:

  1. Hi thanks for sharing information with coding i learn mysqli your blog very helpful
    for me i daily read your blog very nice.

    ReplyDelete