| |

VerySource

 Forgot password?
 Register
Search
View: 967|Reply: 7

SQL varchar (max)

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-4 21:00:01
| Show all posts |Read mode
Max type is supported in MSSQL
Why I define an example when testing:
declare @len as varchar (max)
set @ len = 'fdfd'
But reported a syntax error
Reply

Use magic Report

0

Threads

88

Posts

55.00

Credits

Newbie

Rank: 1

Credits
55.00

 China

Post time: 2020-5-18 19:45:04
| Show all posts
declare @len as varchar (8000)
set @ len = 'fdfd'
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-5-18 20:30:02
| Show all posts
declare @len as varchar (max)
set @ len = 'fdfd'
Do you want as?
Reply

Use magic Report

0

Threads

88

Posts

55.00

Credits

Newbie

Rank: 1

Credits
55.00

 China

Post time: 2020-5-18 22:45:01
| Show all posts
declare @len varchar (max)
set @ len = 'fdfd'
Reply

Use magic Report

0

Threads

28

Posts

25.00

Credits

Newbie

Rank: 1

Credits
25.00

 China

Post time: 2020-5-19 15:00:01
| Show all posts
declare @len as varchar (max)
To
declare @len varchar (max)
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-5-24 12:45:02
| Show all posts
Just don't as
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Unknown

 Author| Post time: 2020-8-4 14:00:02
| Show all posts
declare @len as varchar(max)
set @len='fdfd'
Want as?

------------------
Whether or not as is the same, there is no grammatical error.
It just feels weird:
In SQL, declare @len varchar(max) in "New Query" will report a syntax error,
And try catch is also reporting syntax errors.
Reply

Use magic Report

0

Threads

11

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Japan

Post time: 2020-8-12 17:30:01
| Show all posts
declare @len as varchar(max)
set @len='fdfd'
I don't know what's wrong with your machine, these two sentences are no problem on my machine. Simple cannot be simpler.
Please try another machine, 100% is your SQL problem.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list