Solved

Data insertion into varbinary column

Posted on 2008-10-03
7
1,971 Views
Last Modified: 2011-09-20
i have following table in the mysql.
create table test123 (  name varchar(30), binarynum varbinary(200)).
how to insert data into the table test123.
0
Comment
Question by:pavanark
  • 3
  • 2
7 Comments
 
LVL 5

Accepted Solution

by:
libin_v earned 500 total points
ID: 22632005
Hi,

You I have answered your question in http://www.experts-exchange.com/Database/MySQL/Q_23777229.html

insert into test123 values ( "test", 0x2165489765464546748976465465798 );

You give the data in a Hex Format got instance "012345" in hex is 0x3031323333435 where
30 is ASCII value of 0
31 -> 1
...

So total you can insert values 00 to FF

0
 

Author Comment

by:pavanark
ID: 22632117
here you are inserting hex values.

lets say i have varchar(10)  datatype value. i want to insert  it into varbinary columns. how to do?
0
 
LVL 5

Expert Comment

by:libin_v
ID: 22632129
Give an example of data you want to insert...
0
 

Author Comment

by:pavanark
ID: 22632193
for example
'123'
'100'
0
 
LVL 5

Expert Comment

by:libin_v
ID: 22632232
values that you can print can be inserted directly....

insert into test123 values ( "test", "123" );
insert into test123 values ( "test", "100" );

Non Printable data can be inserted using HEX values
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now