How To Create A SQL Statement - UCSD Blink
Maybe your like
- Budget & Finance
- BI & Financial Reporting
- Buy & Pay
- Finance
- Logistics
- Finance Administration Resources
- Travel & Entertainment
- Facilities & Services
- Campus Planning Site
- Facilities Management
- Real Estate
- Triton Print & Digital Media
- Transportation Services Site
- Faculty & Instruction
- Faculty
- Student/ Class Info
- Student Operational Reporting
- Instruction Tools
- Human Resources
- About Us
- Benefits
- Ecotime
- Employee Center
- UCPath
- UC Learning Center
- IT Services
- Get Help
- Technology Topics
- Browse Service Portal
- Connect from Home
- Careers
- About Us
- Research & Innovation
- About Us
- Organized Research Units (ORUs)
- Research Affairs
- Sponsored Research Administration
- Health & Safety
- Environment, Health & Safety
- Police Department
- Safe Campus
- Blink Resources
- About Blink
- Campus Directory
- Departments in Blink
- List of Tools
- Budget & Finance
- BI & Financial Reporting
- Buy & Pay
- Finance
- Logistics
- Finance Administration Resources
- Travel & Entertainment
- Facilities & Services
- Campus Planning Site
- Facilities Management
- Real Estate
- Triton Print & Digital Media
- Transportation Services Site
- Faculty & Instruction
- Faculty
- Student/ Class Info
- Student Operational Reporting
- Instruction Tools
- Human Resources
- About Us
- Benefits
- Ecotime
- Employee Center
- UCPath
- UC Learning Center
- IT Services
- Get Help
- Technology Topics
- Browse Service Portal
- Connect from Home
- Careers
- About Us
- Research & Innovation
- About Us
- Organized Research Units (ORUs)
- Research Affairs
- Sponsored Research Administration
- Health & Safety
- Environment, Health & Safety
- Police Department
- Safe Campus
- Blink Resources
- About Blink
- Campus Directory
- Departments in Blink
- List of Tools
- Personal
- Compensation Calculator
- Educational Benefits
- Job Bulletin
- My Directory
- Ecotime Campus
- My Training
- Performance Appraisal
- UC Learning Center
- UCnet
- UCPath
- UCRAYS
- Business
- Services & Support
- Concur Travel & Expense
- Oracle Financials Cloud
- AP On-Line
- Business Analytics Hub
- Campus Space Management (Tririga)
- CAMS
- Ecotime Campus
- E-Markets
- EmployeeLink
- FinancialLink
- HireOnline
- JDOnline
- Logistics Portal
- MyMobileBill
- Onboarding
- Oracle Procurement
- PADUA
- PaymentWorks
- Performance Appraisals
- Recharge Plus
- SPARCM (login required)
- STAR
- Title & Pay Look-up
- Tracker I-9 Complete
- UCPath
- VPN
- Instruction
- ASSIST
- Canvas
- Class lists
- Classroom details
- Co-Curricular Record
- eGrades
- Enrollment/waitlists
- Find a student
- General Catalog
- Majors list
- Minors list
- Queries
- Schedule of Classes
- Student Directory
- Term Audit
- Research
- Services & Support
- Faculty Expertise
- Kuali Research
- MyEffort
- My Research Safety
- Research Development
- Training Resources
- Resources For:
- Finance Admin
- Research Admin
- All Tools
- TOOLS:
-
Personal
- Compensation Calculator
- Concur Travel & Expense
- Educational Benefits
- Job Bulletin
- My Directory
- Ecotime Campus
- My Training
- Performance Appraisal
- UC Learning Center
- UCnet
- UCPath
- UCRAYS
-
Business
- Services & Support
- Concur Travel & Expense
- Oracle Financials Cloud
- AP On-Line
- Business Analytics Hub (BAH)
- Campus Space Management (Tririga)
- CAMS
- Ecotime Campus
- E-Markets
- EmployeeLink
- FinancialLink
- HireOnline
- JDOnline
- Logistics Portal
- MyMobileBill
- Onboarding
- PADUA
- PaymentWorks
- Performance Appraisals
- Recharge Plus
- SPARCM (login required)
- STAR
- Title & Pay Look-up
- Tracker I-9 Complete
- UCPath
- VPN
-
Instruction
- ASSIST
- Canvas
- Class lists
- Classroom details
- Co-Curricular Record
- eGrades
- Enrollment/waitlists
- Find a student
- General Catalog
- Majors list
- Minors list
- Queries
- Schedule of Classes
- Student Directory
- Term Audit
-
Research
- Services & Support
- Faculty Expertise
- Kuali Research
- MyEffort
- My Research Safety
- Research Development
- Training Resources
-
Resources for:
- Finance Admin
- Research Admin
-
All
- Faculty & Staff
- Home
- Technology
- IT Help
- Queries
- Creating an SQL Statement
Use this guide to review how to create a select SQL statement to use in the SQL Executer.
As you review the statements and clauses below, note that brackets identify optional information.Include a bracketed item if you want to select more specific data.
- For helpful hints and problem solutions, SQL Review and Troubleshooting.
Note: If you don't know the SQL programming language, you can use QueryLink by clicking the Queries button in FinancialLink, EmployeeLink, Student/ Class Info tools, and DataLink.
1. Start your query with the select statement.
- select [all | distinct] A select statement queries the database and retrieves selected data that match the specified criteria.
2. Add field names you want to display.
- field1 [,field2, 3, 4, etc.] The field name specifies the particular fields that contain the data.
Note: You can find field and data table names in the Data Models section of DataLink.
3. Add your statement clause(s) or selection criteria.
- Required:
- from table1[, table2] The from clause specifies the table(s) that contain the data.
- where conditions The where clause specifies the selection condition(s) by which data is retrieved.
- order by [column-list] The order by clause specifies the ordering or sorting of rows.
- group by [column-list] The group by clause groups the resulting rows in sets.
- having conditions The having clause allows a search condition and is used with the group by clause.
4. Review your select statement.
- Here's a sample statement:
select [all | distinct] field1[,field2] from table1[,table2] [where conditions] [group by field-list] [having conditions] [order by field-list]
- The example below shows SQL being used in the SQL Executer to produce a phone list of all ACT staff by last name.
- The list will show last names, first names, phone extensions, and e-mail addresses.

Queries
- Access
- Creating an SQL Statement
- Troubleshooting
- Using SQL Executer
- QueryLink & Excel PivotTables
- Data Warehouse
Departments
IT Services
Tag » Code Scripts And Database Queries
-
Learn SQL: SQL Scripts
-
2 Using SQL Scripts
-
Top 10 Most Common Database Scripts - Simple Talk
-
An Introductory SQL Tutorial: How To Write Simple Queries
-
SQL Syntax - W3Schools
-
SQL Tutorial - W3Schools
-
Basic Queries
-
SQL Commands - Codecademy
-
Examples Of Database Queries Using SQL And Script - Win32 Apps
-
Database Queries With R
-
SQL Example Statements For Retrieving Data From A Table - IU KB
-
10 Best Practices To Write Readable And Maintainable SQL Code
-
Database Code | IntelliJ IDEA - JetBrains
-
Best Practices For Writing SQL Queries - Metabase