question

13332011 avatar image
0 Votes"
13332011 asked AnuragSharma-MSFT answered

I wants to update an IP adress in my AzureSQL.But when I run the code.It`s failed.

The data type is varchar(20).How can I put the IP into this.Please teach me.Thanks for any suggestions.100716-3.png


azure-sql-database
3.png (12.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

13332011 avatar image
0 Votes"
13332011 answered

Change it to [update tb_User set IP='8.8.8.8' where ID=10000;].Is work.hahahaha

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

Hi @13332011, welcome to Microsoft Q&A forum.

Yes you are right as we need to add single quotes to the text when working with varchar/string fields.

Also you could go through the below link for some widely used queries. At the end of article we have other helpful links as well.

Transact-SQL


If answer helps, please mark it 'Accept Answer'




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.