FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
website-sqlnotebook.com/array-insert-func.html at main · brianluft/website-sqlnotebook.com · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
brianluft
/
website-sqlnotebook.com
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
website-sqlnotebook.com
/
array-insert-func.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (60 loc) · 2.35 KB
Breadcrumbs
website-sqlnotebook.com
/
array-insert-func.html
Copy path
File metadata and controls
62 lines (60 loc) · 2.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html
>
<
html
lang
="
en
"
>
<
head
>
<
meta
http-equiv
="
Content-Type
"
content
="
text/html; charset=UTF-8
"
>
<
meta
http-equiv
="
X-UA-Compatible
"
content
="
IE=edge
"
>
<
title
>
ARRAY_INSERT Function - SQL Notebook
</
title
>
<
link
rel
="
stylesheet
"
href
="
sqlnotebook.css
"
>
</
head
>
<
body
>
<
header
>
<
table
class
="
nav
"
>
<
tr
>
<
td
>
<
a
href
="
index.html
"
>
<
img
src
="
art/SqlNotebookIcon.png
"
alt
="
SQL Notebook (logo)
"
style
="
width: 58px; height: 58px; float: left; margin-right: 20px;
"
>
</
a
>
</
td
>
<
td
>
<
a
href
="
index.html
"
id
="
title
"
>
SQL Notebook
</
a
>
<
br
>
<
nav
>
<
ul
class
="
nav
"
>
<
li
>
<
a
href
="
https://github.com/brianluft/sqlnotebook/releases
"
>
Download
</
a
>
</
li
>
<
li
>
<
a
href
="
doc.html
"
>
<
span
id
="
header-doc-long
"
>
Documentation
</
span
>
<
span
id
="
header-doc-short
"
>
Docs
</
span
>
</
a
>
</
li
>
<
li
>
<
a
href
="
https://github.com/brianluft/sqlnotebook
"
>
GitHub
</
a
>
</
li
>
</
ul
>
</
nav
>
</
td
>
</
tr
>
</
table
>
<
hr
style
="
margin-top: 15px; margin-bottom: 15px;
"
>
</
header
>
<
article
>
<
div
id
="
article
"
>
<
h1
>
<
code
>
ARRAY_INSERT
</
code
>
Function
</
h1
>
<
p
>
Creates a new array by copying an existing array and inserting one or more elements. The existing array is not
modified.
</
p
>
<
h2
>
Syntax
</
h2
>
<
code
>
ARRAY_INSERT(
<
i
>
array
</
i
>
,
<
i
>
element-index
</
i
>
,
<
i
>
value1
</
i
>
, [
<
i
>
value2
</
i
>
], ...)
</
code
>
<
br
>
<
h2
>
Parameters
</
h2
>
<
ul
class
="
args
"
>
<
li
>
<
i
>
array
</
i
>
: blob
<
br
>
The existing array to copy.
</
li
>
<
li
>
<
i
>
element-index
</
i
>
: integer
<
br
>
Zero-based index into the array, specifying where to insert the new elements. If
<
i
>
element-index
</
i
>
equals the
length of the array (i.e. one index past the last element) then the value is appended to the array.
</
li
>
<
li
>
<
i
>
value1
</
i
>
,
<
i
>
value2
</
i
>
, ...: scalar
<
br
>
The values to insert at the specified location.
</
li
>
</
ul
>
<
h2
>
Return Value
</
h2
>
The new array, with the new values inserted at index
<
i
>
element-index
</
i
>
.
<
br
>
<
h2
>
Example
</
h2
>
<
pre
>
DECLARE @a = ARRAY(111, 222, 333);
<
br
>
DECLARE @b = ARRAY_INSERT(@a, 2, 999);
<
br
>
PRINT @a;
<
i
>
-- "[111, 222, 333]"
</
i
>
<
br
>
PRINT @b;
<
i
>
-- "[111, 222, 999, 333]"
<
br
>
</
i
>
</
pre
>
<
h2
>
See Also
</
h2
>
<
ul
>
<
li
>
<
a
moz-do-not-send
="
true
"
href
="
array-func.html
"
>
<
tt
>
ARRAY
</
tt
>
Function
</
a
>
<
br
>
</
li
>
</
ul
>
</
div
>
</
article
>
<
footer
>
<
div
id
="
footer
"
>
<
hr
>
© 2016-2025
<
a
href
="
https://github.com/electroly
"
>
Brian Luft
</
a
>
</
div
>
</
footer
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL