I am trying to add a new contact record with below condition where Account has greter than 99 employees an limit is 1. THough new contact is not getting created in accounts where employess are more than 99. let me know what is wrong in below code. (New to apex)
Contact c = new Contact(Account = [SELECT Name FROM Account
WHERE NumberOfEmployees > 99 Limit 1]);
c.FirstName = 'Test';
c.LastName = 'AM';
System.debug('Contact name is '+c);