Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to fetch alternate records from two tables

To fetch even Numbered row:

SELECT * FROM table_name WHERE column_name % 2 = 0

To fetch odd Numbered row:

SELECT * FROM table_name WHERE column_name % 2 = 1
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle new column 
Sql :: sql drop database statement 
Sql :: alter table 
Sql :: sous requete sql 
Sql :: postgresql array last element 
Sql :: MSSQL SYNTAX PROCEDURE FUNCTION TRIGGER 
Sql :: show tables postgresql 
Sql :: how to rename column in sql 
Sql :: select tables from mysql database 
Sql :: oracle asynchronous update 
Sql :: oracle tablespace datafile max size 
Sql :: SELECT NUMBER OF rows for all tables oracle 
Sql :: best sql course 
Sql :: oracle to_number 
Sql :: where date major today mysql 
Sql :: How to Add a Default Value to a Column in MS SQL Server 
Sql :: mysql config user password 
Sql :: a network or instance-specific error sql server 
Sql :: mysql does sentence contain word 
Sql :: show columns in sql 
Sql :: grant all privileges mysql 
Sql :: vacuum table postgres 
Sql :: drop unique key constraint in sql server 
Sql :: mysql backup query 
Sql :: mysql change collation one column 
Sql :: python sqlalchemy connection show server 
Sql :: postgresql cast 
Sql :: calculate distance between two latitude longitude points sql 
Sql :: pl/sql loop example 
Sql :: postgresql get difference between two dates 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =