Narveen Sis SQL 2
Narveen Sis SQL 2
import pickle
def create_records():
while True:
break
def search_record():
found = False
try:
while True:
try:
record = pickle.load(file)
print("\nEmployee Found:")
print(f"Number: {record[0]}")
print(f"Name: {record[1]}")
print(f"Salary: {record[2]}")
found = True
break
except EOFError:
break
except FileNotFoundError:
if not found:
( Main program)
if choice == '1':
create_records()
search_record()
else:
print("Invalid choice.")
(this may look lengthier but easy to understand. It is similar to the program u
asked for. So don’t get afraid)
Employee Found:
Number: 101
Salary: 50000
I have downloaded SQL but the installation is getting late. The whole library
is of about 10 GB in the 8.0.41 version for 64 bit .