Solved

Data insertion into varbinary column

Posted on 2008-10-03
7
1,987 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Php  POSTGRES  "  IN SIDE "  " 4 75
simple mysql statement 3 37
Whether to use true/false, yes/no or 0/1 11 57
sql_mode 1 24
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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