首页
\
问答
\
jQuery插件,建议/ autocompletes内一个textarea [关闭](jQuery plugin that suggests/autocompletes within a textarea [closed])
jQuery插件,建议/ autocompletes内一个textarea [关闭](jQuery plugin that suggests/autocompletes within a textarea [closed])
有没有一个jQuery插件,建议/ autocompletes在textarea内?
我想要的是在textarea中向用户提供建议的单词或自动完成的文本,如下面的示例图所示:
Is there a jQuery plugin that suggests/autocompletes within a textarea?
What I want is to have suggested words or autocompleted text proffered to the user in a textarea like the example image below:
原文:https://stackoverflow.com/questions/4329617
更新时间:2022-04-26 16:04
最满意答案
你不能用表变量来做它,因为变量必须在可以使用之前被声明,但是你可以使用临时表来代替。
SELECT * INTO #people FROM Persons;
You can't do it with a table variable since a variable has to be declared before it can be used, but you could use a temp table instead.
SELECT * INTO #people FROM Persons;
相关问答
更多-
可以在select语句where子句中使用表变量吗?(Can a table variable be used in a select statement where clause?)[2022-10-26]
关于如何实现这一目标,您有多种选择。 如果要使用集合,则可以使用TABLE函数从中进行选择,但您使用的集合类型变得很重要。 举一个简短的例子,这将创建一个数字表格的数据库类型: CREATE TYPE number_tab AS TABLE OF NUMBER / 已创建类型。 然后下一个块填充集合并使用它作为表执行基本选择,并将其连接到EMP表(有一些输出,以便您可以看到发生了什么): DECLARE -- Create a variable and initialise it v_num_ ... -
必须声明标量变量 - 设置变量等于SELECT语句(Must declare the scalar variable - Setting variable equal to a SELECT statement)[2023-06-23]
您没有SET表变量。 你INSERT它们: INSERT INTO @inputData /* Should have column list here also */ SELECT 1 AS Client_Id, 20170202 AS a, 18595 AS b, 49.82 AS c, 88 AS d, 31 AS e, 0.67 AS f, 0 AS g, ... -
你不能用表变量来做它,因为变量必须在可以使用之前被声明,但是你可以使用临时表来代替。 SELECT * INTO #people FROM Persons; You can't do it with a table variable since a variable has to be declared before it can be used, but you could use a temp table instead. SELECT * INTO #people FROM Persons;
-
MySQL SELECT用IF语句从另一个表设置变量(MySQL SELECT with IF statement to set variable from another table)[2023-11-25]
LEFT JOIN和CASE语句可能适合您。 请参阅下面的查询。 SELECT A.Name AS item, (CASE WHEN B.Val='p' THEN 1 ELSE 0 END) AS Variable FROM Table1 A LEFT JOIN Table2 B ON (A.Name=B.Name) A LEFT JOIN and a CASE statement may work for you. Please see query below. SELECT A.Name AS it ... -
你应该这样做(简化) declare currMonth number:=12; plsql_block VARCHAR2(500); begin plsql_block:='Select Month'||currMonth -2||'_Values, Month'||curr_month-1||'_Values, Month'||currMonth||'_Values from test_ ...
-
SQL中根本没有变量。 只是表格,列和表达式。 所以,显然你不能“首先声明一个变量”。 错误的术语很容易激发一种不适当的方法...... 另外, dateadd()和getdate() ? 你可能会想到MS SQL Server。 这些函数在Postgres中不存在。 无论哪种方式,使用子查询(或CTE)从常量输入构建新的表达式: CREATE TEMP TABLE tmp1_variables AS ( SELECT *, end_date - start_date AS new_variable FRO ...
-
在SQL select语句中重新使用列名作为声明变量(Reusing column name as declared variable in SQL select statement)[2022-06-01]
像这样? declare @cal_name varchar(max) = 'ID' exec ( 'select ' + @cal_name + ' from Table_A union all select ' + @cal_name + ' from Table_B' ) Something like this? declare @cal_name varchar(max) = 'ID' exec ( 'select ' + @cal_name + ' ... -
您不能将变量用于表名。 当您select address from @table SQL中select address from @table期望@table是表类型的变量,而不是标量。 你想做这样的事情: ALTER PROCEDURE testTblName ( @id INT, @name VARCHAR(50) ) AS BEGIN DECLARE @table VARCHAR(50), @add VARCHAR(150), @ ...
-
你不能使用case ..何时在FROM子句中的表之间切换(就像在条件ORDER BY )。 即如下: select * from case when 1=1 then t1 else t2 end; 不行。 所以你需要使用动态SQL。 最好尽可能参数化查询,例如可以参数化@id值: -- Validate @table is E ['images', 'icons', ... other valid names here] DECLARE @sql NVARCHA ...
-
从loop / Select语句作为变量插入表值(Insert into table values from loop/Select statement as a variable)[2021-12-23]
根据您的问题,您似乎希望将所有ID插入到table2中,这对于table1和table2都是基于列“column”的。 并且遗漏了没有任何共同点的其余行。 这意味着你希望table2包含table2 intersect table1(对于列“column”) 现在在sql中你可以轻松地做到这一点,因为它涉及设置操作而不是单行操作。 假设你的表1是 id列 1“A” 2“B” 3“C” 和table2是 id列 3“A” 4“C” 然后在表2中你想插入 1 - 因为“A”并且在table1和中有id 1 3 ...