how can i am search the data from database?
just like google

Answers were Sorted based on User's Feedback



how can i am search the data from database? just like google..

Answer / sharifuddin

for this first design the table like the fields as

EMPNo | EMPNAME | SALARY | DETAILS

Now write the query as follows...

SELECT * FROM EMPLOYE WHERE DETAILS LIKE '%<SEARCH KEY>%'

This is the simplest query for that...

Sharif

Is This Answer Correct ?    3 Yes 0 No

how can i am search the data from database? just like google..

Answer / mahendra

note that, when datatype is string i.e. details like
mahendra, then use like this - "select * from employee
where empname like '%" & trim(txtbob.text) "&' ", i used
because to any leading space will be deleted.

if u want to find salary figure that i integer then
"select * from employee where salary >= " & trim
(txtbob.text) "&"

pl.note '%" & '&" for string


for this first design the table like the fields as

EMPNo | EMPNAME | SALARY | DETAILS

Now write the query as follows...

SELECT * FROM EMPLOYE WHERE DETAILS LIKE '%<SEARCH KEY>%'

This is the simplest query for that...

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How to send auto matic emails based on scheduled tasks to several of my clients

6 Answers  


Features in ASP.NET?

2 Answers   Microsoft,


RequiredFieldValidator--write code in javascript

3 Answers   Wipro,


What are the different types of sessions in asp.net?

0 Answers  


Why we use asp.net for website development?

0 Answers  






What is source control?How to use in asp.net?

1 Answers  


What are validator? Name the validation controls in asp.net?

0 Answers  


What language does asp.net use?

0 Answers  


how can u display multi language (i.e english,spanish...) web site?

2 Answers  


Can we make activex dll also ti execute in some process as that of client ? How can we do?

0 Answers   DELL, Zerone,


How can we create custom controls in asp net?

0 Answers  


What is _viewstart?

0 Answers  


Categories