Customers
Last updated
Last updated
Customers is an auto generated table
The Customers table supports server-side processing for all columns in the WHERE clause. Most of these columns support server-side processing for the >, >=, <, <=, =, IN, NOT IN and LIKE operators.
The following examples show the types of queries processed server side.
Retrieve all customers from your Magento server.\
Retrieve a single customer:\
Filter by status:\
Filter by created date:\
Example query with multiple filters:\
You can turn off client-side execution by setting SupportEnhancedSQL to false, in which case any search criteria that refers to any other columns will cause an error.
To add a Customer, the FirstName, LastName, and Email fields are required.\
Magento allows updates for the FirstName, LastName, MiddleName, Suffix, Email, GroupId, Prefix, DisableAutoGroupChange, and Taxvat columns. WebsiteId is a required value.\
Customers can be deleted by providing the Id of the Customer and issuing a DELETE statement.\
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
SELECT * FROM Customers
SELECT * FROM Customers WHERE Id = '1'
SELECT * FROM Customers WHERE GroupId = 1
SELECT * FROM Customers WHERE CreatedAt > '2017-08-01'
SELECT * FROM Customers WHERE DefaultBilling IN (1,2) AND Firstname LIKE '%i%'
AND WebsiteId=1 LIMIT 50
INSERT INTO Customers(FirstName,LastName,Email,WebsiteId,GroupId) VALUES ('John','Doe','john@example.com',1,1)
UPDATE Customers SET FirstName='Jane', Email='jane@example.com', GroupId=2, DisableAutoGroupChange='0', Prefix='x', Middlename='J', LastName='Doe', Suffix='y',Taxvat=1, WebsiteId=1 WHERE Id = 4
DELETE FROM Customers WHERE Id = 4
Name
Type
ReadOnly
Description
Id [KEY]
Int
False
Customer id
Addresses
String
False
Customer addresses.
Confirmation
String
False
Confirmation
CreatedAt
Datetime
False
Created at time
CreatedIn
String
False
Created in area
DefaultBilling
String
False
Default billing address id
DefaultShipping
String
False
Default shipping address id
DisableAutoGroupChange
Int
False
Disable auto group change flag.
Dob
String
False
Date of birth
String
False
Email address
ExtensionAttributes
String
False
This is an auto-generated column
Firstname
String
False
First name
Gender
Int
False
Gender
GroupId
Int
False
Group id
Lastname
String
False
Last name
Middlename
String
False
Middle name
Prefix
String
False
Prefix
StoreId
Int
False
Store id
Suffix
String
False
Suffix
Taxvat
String
False
Tax Vat
UpdatedAt
Datetime
False
Updated at time
WebsiteId
Int
False
Website id
Name
Type
Description
Id_p
String
This is an auto-generated column