English 中文(简体)
可将哪些数据储存在KQ服务器的var化数据类别中?
原标题:What data can be stored in varbinary data type of SQL Server?

我有一个表格,用户密码领域有变式数据类型,因此,我感到困惑的是,如果我把数据保存到用户密码领域,那就是一种表格,因为当我用斜体数据时,它给我留下错误。

最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 页: 1 为了在其中储存座标,您必须将其投到<条码>。

declare @t table (id int identity, pwd varbinary(50))
insert into @t (pwd) values (cast( secret  as varbinary(50)))

但是,对于密码而言,varbinary 一栏通常储存某种种类的洗衣。 例如,使用HashBytes功能:

insert into @t (pwd) values (HashBytes( sha1 ,  secret ));

避开单向 has,而不是真正的密码,是比较安全的。 您可以核实密码是否与:

select * from @t where pwd = HashBytes( sha1 ,  secret )

但是,你看一看桌子是无法检索密码的。 因此,只有终端用户知道他的密码,而即便是德国统计局也无法检索。

问题回答

你们需要明确投放VARCHAR。

SELECT CAST(N Test  as VARBINARY)

页: 1 服务器错误信息是说的。

Implicit conversion from data type varchar to varbinary is not allowed.

SELECT CAST(N Test  as VARBINARY)

页: 1

SELECT CAST(N Test  as VARBINARY(30))




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

SQL Query Shortcuts

What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2

PHP array callback functions for cleaning output

I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

Running numbers in SQL

I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签