Search
 
SCRIPT & CODE EXAMPLE
 

SQL

select last row mysql

SELECT
  (SELECT * FROM tableName ORDER BY col1 LIMIT 1)        AS first,
  (SELECT * FROM tableName ORDER BY col1 DESC LIMIT 1)   AS last
;
Comment

select first and last row mysql

(select *from DemoTable694 order by EmployeeId ASC LIMIT 1)
UNION
(select *from DemoTable694 order by EmployeeId DESC LIMIT 1);
Comment

PREVIOUS NEXT
Code Example
Sql :: SELECT SQL LIKE 
Sql :: Why mysql is used? 
Sql :: online sql compiler 
Sql :: between operator 
Sql :: sql file in postgres with pgadmin 
Sql :: how do you insert boolean to postgresql 
Sql :: SQL Delete and Truncate Rows 
Sql :: mysql procedure 
Sql :: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client . Can not run php artisan migrate 
Sql :: sql to linq converter 
Sql :: current month transactions in mysql 
Sql :: pl sql revoke role from user 
Sql :: psql list view rules 
Sql :: sqlite dropping multiple tables 
Sql :: nosqlbooster query other collection 
Sql :: First Step in installing SQL workbench 
Sql :: sqlite show table headers 
Sql :: deduplicate delimited string bigquery 
Sql :: datetrunc hour snowflake 
Sql :: mysql use password error 
Sql :: row_number equivalent MS Access for sequential id By Group (2) 
Sql :: error-expression-select-list-not-group-by-nonaggregated-column/ 
Sql :: SELECT MAX(age) FROM Customers; 
Sql :: SQL IN Operator With Duplicate Values 
Sql :: SQL AS With Expression 
Sql :: migration to create a gender in the database table 
Sql :: mode sql course 
Sql :: sql dcl queries 
Sql :: implizite joins sql 
Sql :: difference between on and where in sql 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =