In this post i will explain you how to create a external content type in SharePoint 2013 online from a on premises Sql Server
1. Create and Deploy OData Services to any
server that can be accessed on internet
1. Create BDC Model using Visual Studio
1. Go to SharePoint Admin Center
a.
Click BCS from left menu and click Manage BDC
Models and External Content Types
b
Choose BDC Model from drop down and click import
c.
Import the BDC model which you have extracted in
Step 2
d.
Select the external content types from the drop
down and choose your content type that is imported from the BDC Model and click
set object permissions. Permissions are required so that users can read the
data using this content type
1. Create External List from this content type
Click add an app
and then choose external list from the apps and then select the external
content type for the data source of this list.