in Education by
I'm trying to append zeroes to a blob field in a sqlite3 db. What I tried is this: UPDATE Logs SET msg_buffer = msg_buffer || zeroblob(1) WHERE msg_id = 'F0' As you can see, the field name is "msg_buffer", and what I want is to append byte zero. It seems that the concat operator || doesn't work. How could I achieve this? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Reading the doc link posted by Googie (3.2. Affinity Of Expressions), I managed to find the way: UPDATE Logs SET msg_buffer = CAST(msg_buffer || zeroblob(1) AS blob) WHERE msg_id = 'F0' The CAST operator can take the expression with the concatenate operator and force the blob affinity.

Related questions

0 votes
    The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the SQLite datetime ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    Is there any way to pad a numeric string with zeroes to the left side in a Python script, I want it to be of a specific length? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    what is the easiest way to convert a Blob into a byte array?I am using MYSQL and i want to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    what is the easiest way to convert a Blob into a byte array?I am using MYSQL and i want to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    in the source directory, i have some binary files named 1.bin, 2.bin, 3.bin, etc. In the dest ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    why it's not working.. i want to update my table in database this is my code. for ($i=0; ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I inserted in PostgreSQL table an UUID created with go.uuid : import ( "github.com/satori/go.uuid" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I inserted in PostgreSQL table an UUID created with go.uuid : import ( "github.com/satori/go.uuid" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I have this table where columns correspond to names: i.e. 11 = first, 12 = second, 13 = third.. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 15, 2022 in Education by JackTerrance
0 votes
    I would really appreciate if someone can guide me to check if a particular field is included in update call inside ... . Many thanks. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    Whenever an update operation occurs on a page, the operation stores the LSN of its log record in the _______ ... is from ARIES in section Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    So the scenario is the following: I have multiple instances of a web service that writes a blob of data to ... other unknown issues? Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    I have text stored in a database table, many short rows about 70-90 characters long fields. (of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I have text stored in a database table, many short rows about 70-90 characters long fields. (of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Concatenate two NumPy arrays vertically (4 answers) Closed 3 years ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
...