I have a shapfile which contains 8316420 attributes. I need to delete around 600000 attributes. I am using select by attributes option. But, when I am trying this option it's not working.
Is there any easy way to delete millions of attributes?
Select Layer By Attribute will be very slow for that many features.
You could use your query to make a new layer with Make Feature Layer. This layer will contain only features that you want to delete, so just select them all and delete.
Or you could d o it with a little Python script:
layer = "LayerName"
query = "SomeField = 'DELETE ME'"
with arcpy.da.UpdateCursor(layer, ["OID@"], query) as cursor:
for row in cursor:
cursor.deleteRow()
These will edit your shapefile, so make a backup!
1. Open your attributes table in ArcMap
2. Open search option, write delete field ...
3. Select Data Management Tool
4.Select Field, here you can find many options to select one field or multiple fields and proceed further for deleting attributes field.
5. If you want to delete records, just create one new field and fill it with two options 0 and 1. Write 1 for those records you want to keep and 0 for those records you do not need.
I hope it will works for you
Good luck