How to select records from database using CFquery in ColdFusion

cfquery - select data

cfquery.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfquery example: how to select data</title>
</head>

<body>
<h2 style="color:crimson">cfquery example: how to select data</h2>
<cfquery name="qEmployee" datasource="cfdocexamples">
 SELECT FirstName, LastName, Salary  FROM Employee
</cfquery>
<cfdump var="#qEmployee#">
</body>
</html>





More ColdFusion examples