can anyony helpme to to search a database for records

Recommended Answers

All 2 Replies

pheww.. your question is too wide, what is this? database side or application side? which metode that you want to do? please more spesific sir.

You select records from a database using the SELECT statement. You can select all fields or a series of named fields. For example

select * from Employees
select FirstName, LastName, Salary from Employees

The first statement selects all fields, the second selects only the named fields. All records in the Emplolyees table are returned. To restrict which records are returned you use a WHERE clause as in

select * from Employees where Salary > 36000
select * from Employees where Salary between 50000 and 75000

Select statements can be amazingly powerful (and correspondingly complex and hard to write and read). But the simple answer to your question is that you use a SELECT statement with a WHERE clause (in some cases, a HAVING clause) to search the records in a database table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.