我想编写一个存储过程,其中有两个选择查询,第二个查询具有依赖于第一个查询输出的 where 子句,如
create procedure getRecord
As
Begin
select *
from tblUser
where userName = 'Johan'
select *
from tblDistrict
where id between @id1 and @id2
end
Run Code Online (Sandbox Code Playgroud)
这里@id1和@id2是第一个查询结果表的第一个和最后一个 id
我想在文本框的输入更改时调用类型脚本函数,它对我有用。但是它会在每次更改时调用,我想在文本框中的最小字符数为5时调用。
export class StudentMaintenanceComponent implements OnInit {
@Component({
selector: 'app-student-management',
template: `<input placeholder="" class="form-control" type="text" [maxlength]="5" (input)="SearchData($event.target.value)">`,
styleUrls: ['./app-student-management.css']
})
SearchData(_no: string) { // should be called when minimum no of character are 5 in the text field.
console.log(_no);
}
}
Run Code Online (Sandbox Code Playgroud)